现在的位置: 首页 > 综合 > 正文

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

2013年08月31日 ⁄ 综合 ⁄ 共 516字 ⁄ 字号 评论关闭

错误消息如下:

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"设置成相应的交叉工具链。

抱歉!评论已关闭.