• 4400阅读
  • 1回复

What's wrong? [复制链接]

上一主题 下一主题
离线溟阡
 
只看楼主 倒序阅读 楼主  发表于: 2008-08-04
— 本帖被 XChinux 执行加亮操作(2008-08-04) —
[root@rebel56 ~]# cd /home/user1/chapter01/hello/src
[root@rebel56 src]# qmake -project
[root@rebel56 src]# qmake
[root@rebel56 src]# make
g++  -o src hello.o    -L/usr/local/Trolltech/Qt-4.4.0/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm
/usr/bin/ld: cannot find -lqt-mt
collect2: ld returned 1 exit status
make: *** [src] Error 1
[root@rebel56 src]#
离线steinlee

只看该作者 1楼 发表于: 2008-08-06
I think you are using Qt3 to compile your code. In Qt3 you need -lqt-mt. In Qt4 you do not need it. You can either manually remove it from your Makefile or check if your Qt installation is right. Type  qmake --version to see what you get.

You can also type linux command "locate qt-mt" and then you can see  -lqt-mt is only a library for Qt3. The results from my computer is:
/usr/lib/qt-3.1/lib/libqt-mt.so.3.1.2
/usr/lib/qt-3.1/lib/libqt-mt.so.3
/usr/lib/qt-3.1/lib/libqt-mt.so.3.1
/usr/lib64/qt-3.1/lib/libqt-mt.so.3.1.2
/usr/lib64/qt-3.1/lib/libqt-mt.so.3
/usr/lib64/qt-3.1/lib/libqt-mt.so.3.1
/usr/lib64/qt-3.1/lib/libqt-mt.so
/opt/qt/qt-3.3.4/lib/libqt-mt.prl
/opt/qt/qt-3.3.4/lib/libqt-mt.la
/opt/qt/qt-3.3.4/lib/qt-mt.pc
/opt/qt/qt-3.3.4/lib/libqt-mt.a
/opt/qt/qt-3.3.4-nongui/lib/libqt-mt.prl
/opt/qt/qt-3.3.4-nongui/lib/libqt-mt.la
/opt/qt/qt-3.3.4-nongui/lib/qt-mt.pc
/opt/qt/qt-3.3.4-nongui/lib/libqt-mt.a
/opt/qt/qt-3.3.4-shared/lib/libqt-mt.prl
/opt/qt/qt-3.3.4-shared/lib/libqt-mt.la
/opt/qt/qt-3.3.4-shared/lib/qt-mt.pc
/opt/qt/qt-3.3.4-shared/lib/libqt-mt.so.3.3.4
/opt/qt/qt-3.3.4-shared/lib/libqt-mt.so

It does not appear in Qt4 dirs.
[ 此贴被steinlee在2008-08-06 03:12重新编辑 ]
Looking for remote C/C++ and Qt 兼职
快速回复
限100 字节
 
上一个 下一个