错误消息如下:
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"设置成相应的交叉工具链。 |