3
votes

I've been searching the stack and google for solutions to my problem, but I haven't found any that work. I'm trying to compile some sample code that came with NetBeans to test it out, but I'm getting nowhere. I keep getting the following 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/Damian/Documents/NetBeansProjects/InputOutput_1'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/inputoutput_1.exe
make.exe[2]: Entering directory `/c/Users/Damian/Documents/NetBeansProjects/InputOutput_1'
mkdir -p build/Debug/MinGW-Windows/src
make.exe[2]: mkdir: Command not found
make.exe[2]: *** [build/Debug/MinGW-Windows/src/io.o] Error 127
make.exe[2]: Leaving directory `/c/Users/Damian/Documents/NetBeansProjects/InputOutput_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Damian/Documents/NetBeansProjects/InputOutput_1'
make.exe": *** [.build-impl] Error 2

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

My NetBeans setup is as follows:

Base Directory: C:\MinGW\bin
C Compiler: C:\MinGW\bin\gcc.exe
C++ Compiler: C:\MinGW\bin\g++.exe
Fortran Compiler: C:\MinGW\bin\gfortran.exe
Assembler: C:\MinGW\bin\as.exe
Make Command: C:\MinGW\msys\1.0\bin\make.exe
Debbuger Command: C:\MinGW\bin\gdb.exe

And I have set the PATH environment variables accordingly:
PATH --> C:\MinGW\msys\1.0\bin;C:\MinGW\bin;

I've also made sure that mkdir.exe is actually in "C:\MinGW\msys\1.0\bin".

>mkdir test123

##The result is folder "test123" being created in whatever 
##directory I was running the command prompt from

I did notice that the -p flag is being applied when mkdir is being executed, so I tried that in the command prompt and it returned the following error:

C:\Users\Damian>mkdir -P A/A/A/A
The syntax of the command is incorrect.

Has anyone run into a similar issue? I used the "mingw-get-setup.exe" from http://sourceforge.net/projects/mingw/files/Installer/ if that's relevant at all. I can't think of anything else, I don't know why the -p flag isn't working. I looked up it's function, and it's for making nested folders. Either way you can't make nested folders with or without the -p flag using mkdir. You just get the error "The syntax of the command is incorrect."

Not sure if it's of any use, but I'm running Windows 8.1 (64bit). I have also tried using the mingw-w64 fork of mingw32 (i.e. http://sourceforge.net/projects/mingw-w64/), but I get the same error.

1
mkdir is also a windows built-in command, and your command prompt tests are calling that, so they don't prove anything.T.C.
Also, if you set PATH in your system settings after NetBeans is already up and running, you may want to try restarting it.T.C.
True, although I did try running it from the directory mkdir is in, but I guess I should have figured windows mkdir takes precedence unless I call msys mkdir directly. I restarted NetBeans at least 6 times last night, but it didn't help at the time. Turned on my PC this morning and everything was working. It's strange since I set my environment variables via the main properties dialogue, not the cmd prompt which I read requires a restart. I guess NetBeans must be closed when they are set? Either way, the issue is resolved. This question can be closed or deleted.DamianJ

1 Answers

0
votes

Your settings are correct. This can happen if you have set the settings on netbeans before/during the time of installing MINGW. Just restart netbeans