我正在尝试修复我的Netbeans以编译C/ C++程序,但我得到了以下错误:
"/D/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/MOTIVECODEX/Documents/NetBeansProjects/make'
"/D/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_TDM-Windows/make.exe
make.exe[2]: Entering directory `/c/Users/MOTIVECODEX/Documents/NetBeansProjects/make'
mkdir -p build/Debug/MinGW_TDM-Windows
make.exe[2]: mkdir: Command not found
make.exe[2]: *** [build/Debug/MinGW_TDM-Windows/main.o] Error 127
make.exe[2]: Leaving directory `/c/Users/MOTIVECODEX/Documents/NetBeansProjects/make'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/MOTIVECODEX/Documents/NetBeansProjects/make'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)我已经将这些添加到windows用户变量路径和系统变量路径中:
D:\MinGW\bin; D:\MinGW\msys\1.0\bin; D:\MinGW\mingw32\bin;但还是会犯这个错误。我正在使用MinGW与MSYS与Netbeans 7.4。Windows 7 64位。
我已经停止了MinGW MSYS和Netbeans IDE 7.4。NetBeans IDE 7.4已经安装了C/ C++。
Netbeans中的路径:

我知道这是一个重复,但那些“解决方案”没有工作,所以省省我的麻烦,把这个标记为重复。
发布于 2014-03-16 15:09:48
解决我的问题:删除MinGW及其所有组件,并删除文件夹x:\MinGW。然后安装Cygwin,选择您需要的包,教程可以在https://netbeans.org/community/releases/73/cpp-setup-instructions.html#cygwin或YouTube上找到您需要的包。然后将x:\cygwin添加到您的系统路径中,在我的例子中是D:\cygwin 64,然后重新打开Netbeans,转到tools -> options -> C/C++,然后单击Restore默认值。它将一切更改为cygwin,在我的例子中是cygwin64,现在我可以构建没有错误。
发布于 2017-07-18 00:39:35
我写这篇文章是关于我在C语言程序的基础上做了一个干净的构建时遇到的一个问题。有一篇关于C++程序的相同问题的文章指出了一个带有主函数的问题。这篇文章和来自清洁和构建的信息引导我找到了一个解决方案。
创建新项目时:类别: C/C++项目: C/C++应用程序
单击“下一步”后,应在继续之前取消选中“创建主文件”框。之后你不应该有任何问题。
https://stackoverflow.com/questions/22438046
复制相似问题