找不到C++netbeans mkdir中的错误

Error in C++ netbeans mkdir not found?

本文关键字:错误 mkdir C++netbeans 找不到      更新时间:2023-10-16

每次我试图构建我的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;
}

只是一个测试netbeans的简单的hello小世界。

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