• 6698阅读
  • 3回复

LINUX下QT编译错误! [复制链接]

上一主题 下一主题
离线wantingyu
 
只看楼主 倒序阅读 楼主  发表于: 2009-07-01
— 本帖被 XChinux 从 Qt for Windows 移动到本区(2010-02-07) —
请高手帮忙解答:

写了一个很简单的程序,在linux下使用qmake生成Makefile后,make出现以下错误提示

>make
make: *** Warning: File `Makefile' has modification time in the future (2009-07-01 14:50:41 > 2009-07-01 14:27:59.793182)
/usr/lib64/qt-3.1/bin/uic testUI.ui -o .ui/testUI.h
g++ -c -pipe -Wall -W -O2 -g -pipe -fno-use-cxa-atexit -fno-exceptions  -DQT_NO_DEBUG -I/usr/lib64/qt-3.1/mkspecs/linux-g++ -I. -I/usr/lib64/qt-3.1/include -I.ui/ -I. -I.moc/ -o .obj/main.o main.cpp
/usr/lib64/qt-3.1/bin/uic testUI.ui -i testUI.h -o .ui/testUI.cpp
g++ -c -pipe -Wall -W -O2 -g -pipe -fno-use-cxa-atexit -fno-exceptions  -DQT_NO_DEBUG -I/usr/lib64/qt-3.1/mkspecs/linux-g++ -I. -I/usr/lib64/qt-3.1/include -I.ui/ -I. -I.moc/ -o .obj/testUI.o .ui/testUI.cpp
/usr/lib64/qt-3.1/bin/moc .ui/testUI.h -o .moc/moc_testUI.cpp
g++ -c -pipe -Wall -W -O2 -g -pipe -fno-use-cxa-atexit -fno-exceptions  -DQT_NO_DEBUG -I/usr/lib64/qt-3.1/mkspecs/linux-g++ -I. -I/usr/lib64/qt-3.1/include -I.ui/ -I. -I.moc/ -o .obj/moc_testUI.o .moc/moc_testUI.cpp
g++  -o test .obj/main.o .obj/testUI.o .obj/moc_testUI.o  -L/usr/lib64/qt-3.1/lib -L/usr/X11R6/lib64 -lqt-mt -lXext -lX11 -lm
/usr/lib64/qt-3.1/lib/libqt-mt.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [test] Error 1

我的系统信息如下:
>uname -a
Linux NTSIMLU13 2.4.21-32.EL #1 SMP Fri Apr 15 21:02:58 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
离线shiroki

只看该作者 1楼 发表于: 2009-07-01
file /usr/lib64/qt-3.1/lib/libqt-mt.so
输出什么?
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
离线wantingyu
只看该作者 2楼 发表于: 2009-07-01
不知道啊,这个是qmake自己生成的,我只是用qmake -o Makefile XXX.pro而已
离线lanjinghao
只看该作者 3楼 发表于: 2009-07-10
是编译每个程序都是这样吗?很可能是缺少一些包,网上搜索一下
简单的程序最好自己编写makefile文件,应该是可以编译过去的
快速回复
限100 字节
 
上一个 下一个