我昨天重新下了一次源代码,又重新安装了一次。这次还是没装上。我给下具体的错误提示。
执行./configure后的提示
NOTICE: Qt will not be built with XShape support.
As a result, drag-and-drop in the Qt Designer will NOT
work. We recommend that you enable XShape support by passing
the -xshape switch to ./configure.
Qt is now configured for building. Just run 'make'.
Once everything is built, Qt is installed.
You should not run 'make install'.
To reconfigure, run 'make confclean' and 'configure'.
然后就是make了
执行make后的提示
/usr/bin/ld: cannot find -lXext
collect2: ld 返回 1
make[1]: *** [../../lib/libQtGui.so.4.4.3] 错误 1
make[1]:正在离开目录 `/usr/local/Trolltech/Qt-4.4.3/src/gui'
make: *** [sub-gui-make_default-ordered] 错误 2
我个人认为是源代码不全,但这次下载的源代码应该没什么问题。
然后就是编译HELLOWORLD了,错误提示如下:
bylee@bylee-laptop:~/WorkStation$ qmake -project
bylee@bylee-laptop:~/WorkStation$ qmake
bylee@bylee-laptop:~/WorkStation$ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.4.3/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.4.3/include/QtCore -I/usr/local/Trolltech/Qt-4.4.3/include/QtCore -I/usr/local/Trolltech/Qt-4.4.3/include/QtGui -I/usr/local/Trolltech/Qt-4.4.3/include/QtGui -I/usr/local/Trolltech/Qt-4.4.3/include -I. -Ibasicwin/src -IQHelloWorld/src -I. -I. -o Hello.o Hello.cpp
g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.4.3/lib -o WorkStation Hello.o basicwin.o main.o qhelloworld.o moc_qhelloworld.o qrc_application.o -L/usr/local/Trolltech/Qt-4.4.3/lib -lQtGui -L/usr/local/Trolltech/Qt-4.4.3/lib -L/usr/X11R6/lib -lpng -lXext -lX11 -lQtCore -lz -lm -lrt -ldl -lpthread
basicwin.o: In function `main':
basicwin.cpp:(.text+0x5a0): multiple definition of `main'
Hello.o:Hello.cpp:(.text+0x0): first defined here
main.o: In function `main':
main.cpp:(.text+0x0): multiple definition of `main'
Hello.o:Hello.cpp:(.text+0x0): first defined here
/usr/bin/ld: cannot find -lQtGui
collect2: ld 返回 1
make: *** [WorkStation] 错误 1
是不是跟我的系统是gnome有关系阿?
谢谢啊。。
我编译两天了。。。。