我在ubuntu上用ARM-linux-gcc重新编绎了QT,在Trolltech下生成QtEmbedded-4.8.6-arm目录,添加环境变量后qmake -v
root@ubuntu:/home/shiyu/qtex1# qmake -v
QMake version 2.01a
Using Qt version 4.8.6 in /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib
使用了新的qmake
然后我写了个hello.cpp用新的qmake编绎,make里就出现了下面的错误,
root@ubuntu:/home/shiyu/qtex1# make
arm-linux-gnueabihf-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/mkspecs/qws/arm-linux-gnueabihf-g++ -I. -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.8.6-arm/include -I. -I. -o hello.o hello.cpp
hello.cpp:4:5: warning: unused parameter ‘argc’ [-Wunused-parameter]
hello.cpp:4:5: warning: unused parameter ‘argv’ [-Wunused-parameter]
arm-linux-gnueabihf-g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -o hello hello.o -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib -lQtNetwork -lQtCore -lpthread
/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to `QInotifyFileSystemWatcherEngine::create()'
/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to `clock_gettime'
/usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to `QDnotifyFileSystemWatcherEngine::create()'
collect2: error: ld returned 1 exit status
make: *** [hello] 错误 1
找了好久都没解决方法,那位大神遇到过这个问题啊? |