我按照一些教程安装了 MinGW 和 CDT。我正在尝试编译并运行“hello world”代码。 eclipse 中没有错误,但是当我编译代码时出现此错误:
22:48:32 **** Incremental Build of configuration Debug for project test3 ****
Info: Internal Builder is used for build
g++ "-IC:\\MinGW\\lib\\gcc\\mingw32\\4.8.1\\include\\c++" "-IC:\\MinGW\\lib\\gcc\\mingw32\\4.8.1\\include\\c++\\mingw32" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\test3.o" "..\\src\\test3.cpp"
g++: error: CreateProcess: No such file or directory
22:48:32 Build Finished (took 135ms)
代码:
#include <iostream>
using namespace std;
int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0;
}
最佳答案
这可能是一个愚蠢的问题,但是您在构建文件之前是否将其保存在某个地方?我遇到过这样的错误,通过将其保存在我的桌面或任何地方解决了。
编辑:似乎有几个人在使用 MinGW 时遇到问题。您提到您查看了以前的 stackoverflow 问题,它们是否包括以下内容:
Eclipse CDT error: Unable to compile MinGW error: No such file or directory exists
其他解决方案建议您尝试通过命令行编译程序,这...应该不是问题,因为它只是“Hello, World”。
关于c++ - Eclipse C++ 构建错误 : no such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23480669/