c++ - Eclipse C++ 构建错误 : no such file or directory

标签 c++ eclipse mingw eclipse-cdt

我按照一些教程安装了 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/

相关文章:

复制指针字符未按预期工作

c++ - 如何格式化此输出 C++

c++ - 修改connect()超时时间

android - 找不到 com_actionbarsherlock.apk

eclipse - 写eclipse junit插件测试

android - 在 Logcat 上启用来自真实设备的日志消息

gcc - 在制作 DLL 时让 ld 忽略 undefined reference

python - 无法在 Windows 10 collect2.exe 错误上使用 Python27 MingW 安装 leven 包

c++ - c++ static_cast 的必要性是什么

C++11模板函数接受多个模板别名