Qt Creator:包含库时出错“跳过不兼容”

时间:2012-01-19 14:30:28

标签: qt

我在Linux KDE上使用Qt Creator。我即将在我的Qt项目中包含一个库。该库已成功包含,但我收到以下错误:

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libcrypto.so when 
searching for -lcrypto (the following is in red colour) File not found: (which one isn't 
told)

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libcrypto.a when 
searching for -lcrypto (the following is in red colour) File not found: (which one isn't 
told)

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libpthread.so when 
searching for -lpthread (the following is in red colour) File not found: (which one isn't 
told)

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libpthread.a when 
searching for -lpthread File not found: (which one isn't told)

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libm.so when 
searching for -lm File not found: (which one isn't told)

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libm.a when searching 
for -lm File not found: (which one isn't told)

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libc.so when 
searching for -lc File not found: (which one isn't told)

    :-1: error: skipping incompatible /home/administrator/yyyyy/xxxxx/../../../../opt/QtSDK
/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib//libc.a when searching 
for -lc File not found: (which one isn't told)

我使用Qt Creator中的“添加库”功能在.pro文件中添加了库,并选择了“外部库”。我得到了以下代码:

unix:!macx:!symbian: LIBS += -L$$PWD/../../../../opt/QtSDK/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib/ -lcrypto

INCLUDEPATH += $$PWD/../../../../opt/QtSDK/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/include/openssl
DEPENDPATH += $$PWD/../../../../opt/QtSDK/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/include/openssl

unix:!macx:!symbian: PRE_TARGETDEPS += $$PWD/../../../../opt/QtSDK/Madde/sysroots/harmattan-nokia-meego-arm-sysroot-1122-slim/usr/lib/libcrypto.a

其实我的程序有效,但我不明白Qt在做什么。似乎Qt试图包含其他具有相似名称的库 - 但为什么呢?

1 个答案:

答案 0 :(得分:3)

可能是您的系统上同时拥有x64和x86库,并且在查找过程中会跳过不兼容的库