Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in C++ netbeans mkdir not found?

Tags:

c++

mkdir

Everytime I try to build my c++ file I get this error

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/c__train.exe
make[2]: Entering directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[2]: mkdir: Command not found
mkdir -p build/Debug/MinGW-Windows
make[2]: Leaving directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[1]: Leaving directory `/c/Users/Joey/Documents/NetBeansProjects/C++Train'
make[2]: *** [build/Debug/MinGW-Windows/HelloWorld.o] Error 127
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 2s)

I checked the directory the make.exe was in and mkdir was there so I'm just baffled.

my code itself shows no errors:

#include <iostream>

int main() {
    using namespace std;
    cout << "Hello World!" << endl;
    return 0;
}

Just a simple little hello world to test netbeans.

like image 589
Joey Clark Avatar asked Aug 21 '12 03:08

Joey Clark


1 Answers

I guess you didn't add msys to your PATH variable. See this entry in the Netbeans forum(http://forums.netbeans.org/topic38061.html) 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.

like image 67
KUDUS Avatar answered Oct 24 '22 01:10

KUDUS