1

I have a C project that I am building on a Windows 10 host in netbeans using MinGW for the compilers. I can clean and build the project fine.

I tried cleaning the project from the command line using exactly the same command that netbeans shows in its Output tab:

C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug clean

However, when I run this, the 'rm' command is not recognised (whereas in netbeans it is). I assume this is something to do with an environment variable setting that netbeans uses (which should point to C:\MingGW\msys\1.0\bin ), but I can't find it anywhere in the netbeans project configuration files.

In the netbeans Makefile-Debug it uses the Makefile environment variable ${RM} but on printing this to screen it references 'rm -f'.

user12066
  • 613
  • 6
  • 23

1 Answers1

1

Try submitting where rm from the command line.

If it fails (and presumably it will with the error Could not find files for the given pattern(s)), then you need to add C:\MinGW\msys\1.0\bin to your PATH, and then try make again in a new Command Prompt window. If you still have problems after doing that:

  • Verify that where rm is now locating rm in C:\MinGW\msys\1.0\bin.
  • Update your question with the actual error reported on the command line when you call make, and the content of your PATH variable.
skomisa
  • 16,436
  • 7
  • 61
  • 102
  • It turned out I needed to add C:\MinGW\bin and C:\cygwin\bin as well as C:\MinGW\msys\1.0\bin for everything to work. Thanks for the pointer. – user12066 Feb 01 '19 at 14:21