eclipse出现的错误:Relocations in generic ELF (EM: 40)

论坛 期权论坛 脚本     
匿名技术用户   2020-12-30 22:58   11   0

错误消息如下:

Invoking: Cross G++ Compiler
arm-hisiv200-linux-g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"test.d" -MT"test.d" -o"test.o" "../test.cpp"
Finished building: ../test.cpp

Building target: rapidxml_test

Invoking: Cross G++ Linker
g++ -o"rapidxml_test" ./test.o
/usr/bin/ld: ./test.o: Relocations in generic ELF (EM: 40)

仔细查看消息得到编译和连接时用的工具链不一致,造成,修改一下Link时的工具链就OK了。


在搭建交叉编译环境时:

快捷键“Alt+Enter”-》properties菜单;

点击“C/C++ Build”-》Settings;

点击“Tool Settings”中的“Cross GCC Compiler”、“Cross G++ Compiler”和“Cross GCC Linker”中“Command”和"All option"设置成相应的交叉工具链。

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP