【问题标题】:Eclipse c++ build error: no such file or directoryEclipse c++ 构建错误:没有这样的文件或目录
【发布时间】:2014-06-22 05:43:40
【问题描述】:

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

【问题讨论】:

  • 我在发布之前看到了这个答案,它并没有解决我的问题
  • 如果您无法解释您的案例为何不同,您的问题仍将作为重复问题关闭。您不能仅仅因为现有问题没有“足够”的答案就再次打开同一个问题。

标签: c++ eclipse mingw eclipse-cdt


【解决方案1】:

可能会问一个愚蠢的问题,但是您是否在构建文件之前将文件保存在某个地方?我遇到过这样的错误,通过将其保存在我的桌面或其他任何地方来解决。

编辑:似乎有几个人在使用 MinGW 时遇到问题。您提到您查看了以前的 stackoverflow 问题,它们是否包括这些:

Eclipse CDT error: Unable to compile MinGW error: No such file or directory exists

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

【讨论】:

  • 保存在项目文件夹中
猜你喜欢
  • 1970-01-01
  • 2011-03-29
  • 2020-04-05
  • 2017-12-15
  • 1970-01-01
  • 2019-05-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多