0

我已经安装了 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 ****
4

1 回答 1

1

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

于 2011-08-13T19:00:37.233 回答