- 论坛徽章:
- 0
|
本帖最后由 hzy2hzy 于 2012-01-05 16:05 编辑
回复 1# zxz1984
你好,编译QT,提示找不到QtCore库,如下,怎么解决:
QtCore库不是在Qt编译过程中生成的吗?
rm -f libQtXml.so.4.8.0 libQtXml.so libQtXml.so.4 libQtXml.so.4.8
g++ -Wl,-rpath-link,/mnt/share/temp/qt-everywhere-opensource-src-4.8.0/lib -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.8.0/lib -Wl,-rpath,/usr/local/Trolltech/Qt-4.8.0/lib -shared -Wl,-soname,libQtXml.so.4 -o libQtXml.so.4.8.0 .obj/release-shared/qdom.o .obj/release-shared/qxml.o -L/mnt/share/temp/qt-everywhere-opensource-src-4.8.0/lib -lQtCore -L/mnt/share/temp/qt-everywhere-opensource-src-4.8.0/lib -lpthread
/usr/bin/ld: cannot find -lQtCore
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtXml.so.4.8.0] Error 1
make[1]: Leaving directory `/mnt/share/temp/qt-everywhere-opensource-src-4.8.0/src/xml'
make: *** [sub-xml-make_default-ordered] Error 2
root cause of this problem:
我的源码放在目录 /mnt/share/qt-everywhere-opensource-src-4.8.0下,这是smba mount过来的ntfs文件系统,该文件系统不支持软链接(用ls -l /mnt/share/qt-everywhere-opensource-src-4.8.0查看过文件夹是可写的,就认为权限没有问题!!!),而QT build过程中需要使用ln -s创建该库的临时软链接,就一直提示权限不够。 mv qt-everywhere-opensource-src-4.8.0 /ext4_folder后重新编译OK.
|
|