I am trying to fix my Netbeans IDE to compile C / C++ programs, but I get the following error:

"/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)

I have added these to my windows user variables path and also system variables path:

D:\MinGW\bin; D:\MinGW\msys\1.0\bin; D:\MinGW\mingw32\bin;

But still getting this error. I am using MinGW with MSYS with Netbeans IDE 7.4. Windows 7 64 bit.

I have reïnstalled both MinGW MSYS and Netbeans IDE 7.4. NetBeans IDE 7.4 has C / C++ installed.

Paths in Netbeans:

enter image description here


I know this is a duplicate, but those "solutions" did not work, so spare me the trouble of marking this as duplicate.

有帮助吗?

解决方案

Solution to my problem: Remove MinGW and ALL of it's components, and also remove the folder x:\MinGW. Then install Cygwin, choose the packages you need, tutorial can be found on https://netbeans.org/community/releases/73/cpp-setup-instructions.html#cygwin or YouTube about which packages you need. Then add x:\cygwin to your system path, in my case D:\cygwin64 and reopen Netbeans, go to tools -> options -> C/C++ and click on Restore Defaults. It changed everything to cygwin, in my case cygwin64, and I can build now without errors.

其他提示

I am making this post about a problem that I encounter when I made a clean and build on a C language program. There was a post about the same problem for a C++ program pointing towards a problem with the main function. This post and the message from the clean and build lead me toward a solution.

When you create a new project: Categories: C/C++ Projects: C/C++ Application

After you click on Next you should uncheck the Create Main File box before proceeding. You should not have any problems afterward.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top