【发布时间】:2011-08-13 18:32:30
【问题描述】:
我刚刚安装了带有 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++ -> 构建工具下)。我尝试修复它并在其中键入 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)
如何修复并正确配置 NetBeans(带有 C++ 包)?
【问题讨论】:
-
请直接发布代码/错误,而不是链接。链接会随着时间的推移而消失,然后这个问题对其他人来说毫无用处。
-
@jonsca 是的,我做了新项目(文件 -> 新项目... -> C/C++ 应用程序)。 @Space_C0wb0y 好的,我会修复它。给我一分钟... =]
-
我遇到了同样的问题,我在路径中添加了 msys,我检查了文件夹,我得到了这个错误:/usr/bin/[: missing `]'
标签: c++ netbeans configuration makefile mingw