[英]C++ Code Not Compiling in NetBeans 8.0 (possible issue with msys mkdir)
[英]Error in C++ netbeans mkdir not found?
每次我尝试构建我的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。
我猜你没有在你的PATH变量中添加msys。 请参阅Netbeans论坛( http://forums.netbeans.org/topic38061.html )中的此条目。因此,您收到的错误消息并未抱怨make,它抱怨它无法找到mkdir,这应该是在msys目录的目录中。 将C:\\ MinGW \\ msys \\ 1.0 \\ bin \\添加到您的Windows PATH变量可能足以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.