Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT clean fails on Windows: tries to run rm -rf

I am using Juno with CDT on Windows 7. When I try to clean a project using the internal builder or make provided by MinGW, Eclipse runs the *X command rm -rf and the clean operation fails.

Log using external builder (mingw32-make) from the console:

18:08:07 **** Clean-only build of configuration Debug for project threads_example ****
mingw32-make clean 
rm -rf  ./main.o  ./main.d  threads_example
process_begin: CreateProcess(NULL, rm -rf ./main.o ./main.d threads_example, ...) failed.
make (e=2): The system cannot find the file specified.

mingw32-make: [clean] Error 2 (ignored)
' '

18:08:07 Build Finished (took 137ms)

Log using the internal builder:

10:39:35 **** Clean-only build of configuration Debug for project threads_example ****
rm -rf threads_example main.o main.d 
Cannot run program "rm": Launching failed

Error: Program "rm" not found in PATH
PATH=[C:\CS_powerpc\bin;C:/Program Files (x86)/Java/jre7/bin/client;C:/Program Files (x86)/Java    /jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\siriusSDK\CS_i686\bin;c:\siriusSDK\CS_powerpc\bin;C:\siriusSDK\MinGW\msys\1.0\bin;C:\MinGW\bin;;C:\work\eclipse]


10:39:35 Build Finished (took 41ms)

10:39:35 **** Clean-only build of configuration Debug for project threads_example ****

10:39:35 Build Finished (took 46ms)
like image 815
AdRiX Avatar asked Oct 21 '25 17:10

AdRiX


1 Answers

The best solution is to install GnuUtils/coreutils and add the installed directory (C:\ProgramFiles\GnuWin32\bin)to your windows path then restart eclipse.

Eclipse should execute rm-rf now...

If it still doesn't work, just restart Windows (to set path in windows memeory) and check your path again to be sure it has \GnuWin32\bin . Finally start eclipse.

like image 162
M-Razavi Avatar answered Oct 23 '25 06:10

M-Razavi