Windows – NetBeans + MinGW + C – file not found

cmingwnetbeanswindows 7

I have installed NetBeans 7.3 (twice this day), and installed MinGW (many times today).
My OS Win 7 64

I tried to install MinGW with MSYS, tried MinGW with MSYS and MinGW DT, MinGW without MSYS, tried to install MSYS separate, tried to install as privileged user, changed PATH and compiler settings, to move project to "C:\prj" directory, and tried to add libgcc_s_dw2-1.dll to my project folder, but failed to compile anything everytime.

My PATH and compiler options at the moment look like

enter image description here

enter image description here

But when I try to compile something, for example (C/C++ Application)

#include <stdio.h>
#include <stdlib.h>

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

    return (EXIT_SUCCESS);
}

Or whatever, it may be an empty file, I still get error:

    "/c/Users/samsung/Documents/NetBeansProjects/CppApplication_2/"C:/MinGW/msys/1.0/bin/make.exe"" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
/bin/sh: /c/Users/samsung/Documents/NetBeansProjects/CppApplication_2/C:/MinGW/msys/1.0/bin/make.exe: No such file or directory
make.exe": *** [.build-impl] Error 127


BUILD FAILED (exit value 2, total time: 758ms)

I would be appreciate any suggestion to improve this situation. Thanks!

Best Answer

I have just found the solution to this problem on the NetBeans forums here:

http://forums.netbeans.org/topic54884.html

All you need to do is:

  1. Go to C:\MinGW\bin and make a copy of mingw32-make.exe. Then rename it to make.exe

  2. Now go to C:\MinGW\msys\1.0\bin and rename make.exe to makeOLD.exe (just in case)

  3. Then move your new make.exe into C:\MinGW\msys\1.0\bin.

You may have to restart NetBeans, but you should find you can now compile and build!

I would love to know how this suddenly became a problem. If anyone finds out, please let us know. I have seen a suggestion that updating from Java JDK1.7.0_17 to JDK1.7.0_21 breaks the C++ compilation, but how that could happen is beyond me.

Related Question