关闭

final link failed: Nonrepresentable section on output的解决办法

标签: 嵌入式linux
1040人阅读 评论(0) 收藏 举报
分类:

产生这个错误的原因和链接库有关,具体还不知道为啥,任务太紧了,先把错误解决了再说吧。

arm-linux-g++ -Wl,-O1 -Wl,-rpath,/opt/qt-4.8.5-arm/lib -o SDKTest main.o    -L/opt/qt-4.8.5-arm/lib libfsdk.so -lQtGui -L/opt/tslib-1.4/lib -L/opt/qt-4.8.5-arm/lib -lQtNetwork -lQtCore -lpthread

/home/guo/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: libz.so, needed by libfsdk.so, not found (try using -rpath or -rpath-link)
/home/guo/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: liblog.so, needed by libfsdk.so, not found (try using -rpath or -rpath-link)
/home/guo/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: libc.so, needed by libfsdk.so, not found (try using -rpath or -rpath-link)
/home/guo/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: Warning: libfsdk.so: Unknown EABI object attribute 44
/home/guo/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: SDKTest: hidden symbol `fstat' in /home/guo/usr/local/arm/4.3.2/bin/../arm-none-linux-gnueabi/libc/armv4t/usr/lib/libc_nonshared.a(fstat.oS) is referenced by DSO
/home/guo/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make: *** [SDKTest] Error 1



在编译.pro中的 LIBS += -Llibfsdk.so -shared  让这个库成为共享库,即可编译通过
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:41070次
    • 积分:699
    • 等级:
    • 排名:千里之外
    • 原创:21篇
    • 转载:56篇
    • 译文:0篇
    • 评论:1条
    文章分类