Eclipse c++构建错误:没有这样的文件或目录

Eclipse c++ build error: no such file or directory

本文关键字:文件 构建 c++ 错误 Eclipse      更新时间:2023-10-16

我按照一些教程安装了MinGW和CDT。我试图编译和运行"你好世界"代码。在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错误:无法编译错误:没有这样的文件或目录存在

其他解决方案建议您应该尝试通过命令行编译程序,这…应该没有问题,因为它只是"Hello, World"。