I am trying to install and use Qt 3.3.8 (this version is need, so please don't say to use more recent versions).
Steps I have done:
1. get qt-x11-free-3.3.8.tar.bz2 from
http://download.qt.io/archive/qt/3/
2. extract it to /media/PART/path/qt (any folder that is not the suggested /usr/local). I need to do this because I need to have QT installed in a different partition. Should not change anything, I guess. But assume the folder /media/PART/path/qt as the folder where QT is extracted.
3. Configure the environment variable that QT needs to work correctly. File INSTALL gives instructions to follow. We just add the some paths to include QT folders: QTDIR, PATH, MANPATH, LD_LIBRARY_PATH. I have set them in my .bashrc. After opening a new shell I have:
Code:
# echo $PATH; echo $LD_LIBRARY_PATH ; echo $QTDIR ; echo $MANPATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/media/PART/path/qt/bin
/media/PART/path/qt/lib
/media/PART/path/qt
/media/PART/path/qt/doc/man
4. I have tried two sets of arguments to configure it. The final error does not change.
4.1. ./configure -qt-gif -shared -thread
4.2. ./configure -qt-gif -static -thread
5. The configure should end without errors. Now we will try to build an example that QT includes:
cd /media/PART/path/qt/examples/aclock
make
It stops with an error:
Code:
$ make
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT \
-I/media/PART/path/qt/mkspecs/linux-g++ -I. \
-I../../include -I.moc/release-static-mt/ -o .obj/release-static-mt/aclock.o \
aclock.cpp
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT \
-I/media/PART/path/qt/mkspecs/linux-g++ -I. -I../../include \
-I.moc/release-static-mt/ -o .obj/release-static-mt/main.o main.cpp
/media/PART/path/qt/bin/moc aclock.h -o .moc/release-static-mt/moc_aclock.cpp
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT \
-I/media/PART/path/qt/mkspecs/linux-g++ -I. \
-I../../include -I.moc/release-static-mt/ -o \
.obj/release-static-mt/moc_aclock.o .moc/release-static-mt/moc_aclock.cpp
g++ -Wl,-rpath,/media/PART/path/qt/lib -o aclock \
.obj/release-static-mt/aclock.o .obj/release-static-mt/main.o \
.obj/release-static-mt/moc_aclock.o -L/media/PART/path/qt/lib \
-L/usr/X11R6/lib -lqt-mt -L/usr/X11R6/lib -lXext -lX11 -lm -ldl -lpthread
/usr/bin/ld: cannot find -lqt-mt
collect2: ld returned 1 exit status
make: ** [aclock] Error 1
$ ls /media/PART/path/qt/lib
libdesignercore.prl libqnp.prl libqui.prl
libeditor.prl libqt-mt.la qt-mt.pc
libqassistantclient.prl libqt-mt.prl README
$ echo $LD_LIBRARY_PATH
/media/PART/path/qt/lib
Isn't this strange? What am I missing here?