Page 1 of 1

mingw32-make.exe fails because of space character

Posted: Wed Oct 22, 2014 12:56 am
by Leauki
I am just trying out CodeLite and ran into a problem immediately.

When I try to compile a template project, the output window tells me the following.

Code: Select all

C:\Windows\system32\cmd.exe /c ""C:/Program Files/MinGW-4.8.1/bin/mingw32-make.exe"  SHELL=cmd.exe  -e -f  Makefile"
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make.exe: *** [All] Error 1
"----------Building project:[ HelloWorld - Release ]----------"
Makefile:4: recipe for target 'All' failed
0 errors, 0 warnings
Apparently the space character in the path to MinGW fails the build.

I couldn't figure out where I could change the path to MinGW in the IDE. If I had, I would have moved MinGW into a more appropriate (for CodeLite) directory.

I am using the current version of CodeLite 6.1.1 on 32 bit Windows 8.1.

Any ideas?

Re: mingw32-make.exe fails because of space character

Posted: Wed Oct 22, 2014 7:52 am
by eranif
1. Copy the folder C:\Program Files\MinGW-4.8.1 to a path without a space,
recommended path is:

Code: Select all

C:\MinGW-4.8.1
2. Go to codelite's main menu: settings->build settings->Add Compiler button->Add an existing compiler
And point it to the new location (C:\MinGW-4.8.1)

3. codelite will then detect the compiler, give it a unique name and click OK

4. Open your "project settings->common settings->general->compiler" and select the new compiler from the list

Eran

Re: mingw32-make.exe fails because of space character

Posted: Wed Oct 22, 2014 12:24 pm
by Leauki
Will try tonight.

I am actually using the MSFT compiler, but CodeLite still wants to use MinGW's make.

Does adding MinGW as a new compiler also update settings for make?

Re: mingw32-make.exe fails because of space character

Posted: Wed Oct 22, 2014 12:30 pm
by Leauki
Will CodeLite have the same problem with the MSFT compiler which is also installed somewhere in "program files"?

Re: mingw32-make.exe fails because of space character

Posted: Wed Oct 22, 2014 3:36 pm
by eranif
Leauki wrote:Will CodeLite have the same problem with the MSFT compiler which is also installed somewhere in "program files"?
When I tested it back then, it worked. I can't confirm it now, as I don't have MS compilers installed atm.

You can try and update the compiler command to execute from:
settings->build settings->compilers->YOUR COMPILER->Tools->Compiler Name (try escaping the spaces etc)

Re: mingw32-make.exe fails because of space character

Posted: Thu Oct 23, 2014 1:05 am
by Gibbon1
I've been using an arm cross compiler, everything is under

C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q1\bin

However that is in the path.