Click to See Complete Forum and Search --> : Qt troubles
Dun'kalis
12-07-2002, 04:00 PM
I'm trying to learn C++ and Qt, and I made the Qt "Hello World!" application, and followed the instructions to compile it.
I typed:
qmake -project
qmake
make
Make's output is:
g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I. -I/opt/qt/include -I/opt/qt/mkspecs/default -o qt-hello.o qt-hello.cpp
g++ -o qt-hello qt-hello.o -Wl,-rpath,/opt/qt/lib -L/opt/qt/lib -L/usr/X11R6/lib -lqt -lXext -lX11 -lm
/usr/bin/ld: cannot find -lqt
Thats weird...
bwkaz
12-07-2002, 08:14 PM
What did you install Qt from, and are you sure you put it under /opt/qt?
Does /opt/qt/lib/libqt.so exist?
Energon
12-07-2002, 10:27 PM
Use -lqt-mt instead and it should be fine.
Dun'kalis
12-07-2002, 10:44 PM
-lqt-mt worked. Thanks. Now, if I link /opt/qt/libqt-mt.so to /opt/qt/libqt.so, would I not have to change the Makefiles every time? The Makefile is the default one created by qmake.
x_Ray
12-07-2002, 11:20 PM
Hmm I seem to get the same error with 3.1 here, first time I've really tested it since I installed it. It works fine with my qt 3.04 though. I'll check to see what was done different with that version, I'll let you know.
x_Ray
12-07-2002, 11:30 PM
Ok easy enough I had installed qt-3.0.4 from portage and it was nice enough to create symlinks to libqt-mt for me.
So to make it work proper just do the following:
cd $QTDIR/lib
ln -s libqt-mt.so libqt.so
ln -s libqt-mt.so.3 libqt.so.3
ln -s libqt-mt.so.3.1 libqt.so.3.1
ln -s libqt-mt.so.3.1.0 libqt.so.3.1.0
And everything should be good after that.
bwkaz
12-08-2002, 10:22 AM
Yeah, OK. qt-mt is the thread-safe (or threads-supported, not quite sure which) version of the Qt library. Symlinking libqt to libqt-mt shouldn't cause any problems, unless some program linking against libqt won't work with thread-safety, but I highly doubt that.