在eclipse中构建cpp项目的问题

时间:2011-08-13 18:29:51

标签: c++ gcc mingw eclipse-cdt msys

我安装了minGW和msys。在eclipse CDT中,我创建了使用交叉gcc工具链的c ++项目。

Eclipse创建了make文件,我可以通过命令行使用,所以如果我运行make all项目是正确编译的,但如果我使用eclipse构建,它会失败并显示以下消息

**** Build of configuration Debug for project cpp ****

make all 
Building file: ../src/main.cpp
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.cpp"
make: *** [src/main.o] Error 1

**** Build Finished ****

1 个答案:

答案 0 :(得分:1)

我在项目中选择了错误的工具链,改为mingw gcc,现在它可以正常工作