News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Problems with Rebuild

Started by Anonymous, January 19, 2005, 04:53:04 PM

Previous topic - Next topic

Anonymous

Project   : Console application
Compiler  : MinGW Compiler Suite
Directory : D:\CodeBlockTest\
rm -f hello2.exe .objs/main.o  
process_begin: CreateProcess((null), rm -f hello2.exe .objs/main.o, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe: *** [clean_default] Error 2
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

What is wrong? I can compile the single file, but rebuild gives me a problem.

Regards,
Thomad

mandrav

Go to "Settings/Configure plugins/Compiler", switch to the "Makefile variables" tab and change the value of "RM" from "rm -f" to "del /f".
That should do it.
Be patient!
This bug will be fixed soon...

mike

I got into the same problem after deinstalling Dev-C++ (which obviously had this command). I have installed MinGW distribution, but it does not have "rm". So I changed the settings as described above (by the way, wouldn't it be helpful to do it anyway for Windows distribution? Not too many people have Cygwin incidently installed for the sake of "rm" ;-).

Then running "build" is fine, but running "rebuild" produces the following:
Quote
Cleaning target "msvc-debug"...
Invalid switch - "<filename>.obj".
mingw32-make.exe: *** [clean_msvc-debug] Error 1
Process terminated with status 1 (0 minutes, 0 seconds)
Any ideas?

mandrav

Grab this package here and unzip it in the mingw installation folder (e.g. c:\Mingw). It contains mv.exe rm.exe and cp.exe. I had these files in my hard drive for so long, I can't remember where I got them... I believe they 're from unxutils.

I think i should bundle those files in the setup (first check the licensing)...

Yiannis.
Be patient!
This bug will be fixed soon...

mike

Quote
I think i should bundle those files in the setup (first check the licensing)...

Or add Makefile variables to also allow adjusting of "mv" and "cp" to the DOS alternatives "move" and "(x)copy".

mandrav

IIRC, mv and cp are not used anywhere...
In any case, if you need them, you can add them yourself as makefile variables.

Yiannis.
Be patient!
This bug will be fixed soon...

mike

If "mv" and "cp" are not used, and "rm" can be adjusted (which I did) - what fails?

mandrav

Possibly "del /f", but can't be sure without looking at the makefile...
Be patient!
This bug will be fixed soon...

Anonymous

Im sorry if somebody already asked this, but maybe if the path is interpreted differently by "rm" and "del": "rm" (GNU) uses '/' while "del" (DOS) uses '\', and codeblocks always uses '/' for the file paths with the clean command because it originally assumes "rm" will be used...

Anonymous

Experiment showed that having only "rm" in the MinGW directory is sufficient to make the thing run properly.

mike

mandrav

Yes, the only external dependencies of codeblocks are "rm" and "make" (which are not anymore :) )
And a compiler of course!

Yiannis.
Be patient!
This bug will be fixed soon...

mike

What about "zip"? I get the following message for one of the projects:

Quote
process_begin: CreateProcess((null), zip.exe -a P_inc.cbp.zip P_inc.cbp Makefile <a bunch of header files>, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe: *** [dist] Error 2
Process terminated with status 1 (0 minutes, 0 seconds)

In this project I only have header files for reference.