【问题标题】:Error in C++ netbeans mkdir not found?未找到 C++ netbeans mkdir 中的错误?
【发布时间】:2012-08-16 09:34:52
【问题描述】:

每次我尝试构建我的 c++ 文件时都会收到此错误

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/c__train.exe
make[2]: Entering directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[2]: mkdir: Command not found
mkdir -p build/Debug/MinGW-Windows
make[2]: Leaving directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[1]: Leaving directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[2]: *** [build/Debug/MinGW-Windows/HelloWorld.o] Error 127
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 2s)

我检查了 make.exe 所在的目录,mkdir 在那里,所以我很困惑。

我的代码本身没有显示错误:

#include <iostream>

int main() {
    using namespace std;
    cout << "Hello World!" << endl;
    return 0;
}

只是一个简单的小 hello world 来测试 netbeans。

【问题讨论】:

标签: c++ mkdir


【解决方案1】:

我猜你没有将 msys 添加到 PATH 变量中。请参阅 Netbeans 论坛中的此条目(http://forums.netbeans.org/topic38061.html) 因此,您收到的错误消息并没有抱怨 make,它抱怨它找不到 mkdir,它应该在您的 msys 目录中的目录中。将 C:\MinGW\msys\1.0\bin\ 添加到您的 Windows PATH 变量可能足以解决此问题。

【讨论】:

  • 工作就像一个魅力,谢谢! (当然,我需要重启 NetBeans)
猜你喜欢
  • 1970-01-01
  • 2012-03-02
  • 2011-04-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多