我刚刚安装了带有 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;
}
在“工具”→“选项”→“C/C++”→“构建工具”下,它抱怨“Make 命令”。我试图修复它并在那里键入C:\MinGW\msys\1.0\bin\make.exe。我尝试重新编译它!下面是错误信息...
"/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)
如何修复并正确配置带有 C++ 包的 NetBeans?