daG*_*vis 15 c++ configuration netbeans mingw makefile
我刚刚安装了带有C++包的NetBeans 7.0.它要求C++编译器 - 我安装了MinGW.我将它添加到NetBeans(因此它识别它).我认为这一切都是正确的......
我在main.cpp中编写了非常简单的C++应用程序并尝试编译它...
#include <cstdlib>
#include <iostream>
int main( int argc, char** argv ) {
std::cout << "Hello, world!";
return 0;
}
Run Code Online (Sandbox Code Playgroud)
它抱怨"Make Command"(在工具 - >选项 - > C/C++ - >构建工具下).我试图修复它并在那里键入C:\ MinGW\msys\1.0\bin\make.exe.我试着再次编译它!这是错误信息......
Run Code Online (Sandbox Code Playgroud)"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make[1]: Entering directory `/c/Users/admin/Documents/C++/helloWorld' "/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/helloworld.exe make[2]: Entering directory `/c/Users/admin/Documents/C++/helloWorld' make[2]: mkdir: Command not found mkdir -p build/Debug/MinGW-Windows make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 127 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 make[2]: Leaving directory `/c/Users/admin/Documents/C++/helloWorld' make[1]: Leaving directory `/c/Users/admin/Documents/C++/helloWorld' BUILD FAILED (exit value 2, total time: 2s)
如何正确修复它并配置NetBeans(使用C++包)?
evn*_*vnu 21
我猜你没有在你的PATH变量中添加msys .请参阅Netbeans论坛中的此条目,因为报告的错误与您在问题中粘贴的错误基本相同.因此,您收到的错误消息并没有抱怨make,它抱怨它找不到mkdir,这应该是在msys目录的目录中.添加C:\MinGW\msys\1.0\bin\到您的Windows PATH变量可能足以解决这个问题.