Code::Blocks Forums

User forums => Help => Topic started by: Anonymous on January 19, 2005, 04:53:04 pm

Title: Problems with Rebuild
Post by: Anonymous on January 19, 2005, 04:53:04 pm
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
Title: Problems with Rebuild
Post by: mandrav on January 19, 2005, 06:00:36 pm
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.
Title: Problems with Rebuild
Post by: mike on January 20, 2005, 10:18:15 pm
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?
Title: Problems with Rebuild
Post by: mandrav on January 21, 2005, 12:31:02 am
Grab this package here (http://www.codeblocks.org/files/extras.zip) 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.
Title: Problems with Rebuild
Post by: mike on January 21, 2005, 10:06:01 am
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".
Title: Problems with Rebuild
Post by: mandrav on January 21, 2005, 03:03:24 pm
IIRC, mv and cp are not used anywhere...
In any case, if you need them, you can add them yourself as makefile variables.

Yiannis.
Title: Problems with Rebuild
Post by: mike on January 21, 2005, 03:09:26 pm
If "mv" and "cp" are not used, and "rm" can be adjusted (which I did) - what fails?
Title: Problems with Rebuild
Post by: mandrav on January 21, 2005, 03:35:35 pm
Possibly "del /f", but can't be sure without looking at the makefile...
Title: Problems with Rebuild
Post by: Anonymous on January 21, 2005, 03:54:26 pm
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...
Title: Problems with Rebuild
Post by: Anonymous on January 22, 2005, 09:52:55 pm
Experiment showed that having only "rm" in the MinGW directory is sufficient to make the thing run properly.

mike
Title: Problems with Rebuild
Post by: mandrav on January 22, 2005, 11:07:53 pm
Yes, the only external dependencies of codeblocks are "rm" and "make" (which are not anymore :) )
And a compiler of course!

Yiannis.
Title: Problems with Rebuild
Post by: mike on January 23, 2005, 07:49:48 pm
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.