15
votes

I just installed NetBeans 7.0 with C++ package. It asked for C++ compiler - I installed MinGW. I added it to NetBeans (so it recognize it). I think that it's all correct...

I wrote very simple C++ application in main.cpp and tried to compile it...

#include <cstdlib>
#include <iostream>


int main( int argc, char** argv ) {

    std::cout << "Hello, world!";


    return 0;

}

It complains about "Make Command" (under Tools -> Options -> C/C++ -> Build Tools). I tried to fix it and type C:\MinGW\msys\1.0\bin\make.exe in there. I tried to compile it again! Here's the error message...

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

How to fix it and configure NetBeans (with C++ package) correctly?

4
Please post the code/errors directly, instead of links. Links will die over time, and then the question becomes useless for others.Björn Pollex
@jonsca Yes, I did new project (File -> New Project... -> C/C++ Application). @Space_C0wb0y Okey, I will fix it. Give me a minute... =]daGrevis
I got the same problem, I add msys to path, I check the folders and I got this error: /usr/bin/[: missing `]'marco

4 Answers

21
votes

I guess you didn't add msys to your PATH variable. See this entry in the Netbeans forum, as the error reported there is essentially the same as the one you pasted in your question. So, the error message you received does not complain about make, it complains that it can't find mkdir, which is supposed to be in a directory in your msys directory. Adding C:\MinGW\msys\1.0\bin\ to your windows PATH variable will probably be sufficient to fix this.

0
votes

mkdir in Cygwin may be a separate .exe instead of a function of bash. So you may be just missing it for some reason.

0
votes

"Resolve Missing Native Build Tools" Netbeans Make command problem. Go to -Tools -Options -C/C++ Write to Make Command: C:\MinGW\msys\1.0\bin\make.exe

-2
votes

Solution Copy mingw32-make.exe from MinGW\bin\ to msys folder, replacing make.exe

not sure why this is necessary but, hey, it worked.