2

I just can't build a C/C++ project in NetBeans. The environment variable is properly set.

enter image description here


Error :

"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=            SUBPROJECTS= .build-conf
 make.exe[1]: Entering directory   `/c/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
 "/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk  dist/Debug/MinGW-Windows/cppapplication_1.exe
  make.exe[2]: Entering directory  `/c/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
  mkdir -p build/Debug/MinGW-Windows
  make.exe[2]: mkdir: Command not found
  make.exe[2]: *** [build/Debug/MinGW-Windows/main.o] Error 127
  make.exe[2]: Leaving directory  `/c/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
  make.exe[1]: *** [.build-conf] Error 2
  make.exe[1]: Leaving directory  `/c/Users/Rahul/Documents/NetBeansProjects/CppApplication_1'
  make.exe": *** [.build-impl] Error 2

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


Code :

#include <stdio.h>

int main(void) {
printf("hello");
return 0;
}


NetBeans-1 :
enter image description here


NetBeans-2 :
enter image description here

1
  • Did you try to move MinGW settings in the beginning of your PATH? Commented Jan 22, 2015 at 21:42

1 Answer 1

1

The problem is that the "make" from msys looks for the msys mkdir but can't find it because you are not running in an msys environment.

The safe way to solve this is to launch NetBeans from the msys shell.

Alternatively you can manually create the directory as gcc/g++/... itself is also found on the path outside of an msys environment.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.