mingw32-make.exe fails because of space character

General questions regarding the usage of CodeLite
Leauki
CodeLite Curious
Posts: 5
Joined: Wed Oct 22, 2014 12:52 am
Genuine User: Yes
IDE Question: C++
Contact:

mingw32-make.exe fails because of space character

Post by Leauki » Wed Oct 22, 2014 12:56 am

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?

User avatar
eranif
CodeLite Plugin
Posts: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Wed Oct 22, 2014 7:52 am

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
Make sure you have read the HOW TO POST thread

Leauki
CodeLite Curious
Posts: 5
Joined: Wed Oct 22, 2014 12:52 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by Leauki » Wed Oct 22, 2014 12:24 pm

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?

Leauki
CodeLite Curious
Posts: 5
Joined: Wed Oct 22, 2014 12:52 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by Leauki » Wed Oct 22, 2014 12:30 pm

Will CodeLite have the same problem with the MSFT compiler which is also installed somewhere in "program files"?

User avatar
eranif
CodeLite Plugin
Posts: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Wed Oct 22, 2014 3:36 pm

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)
Make sure you have read the HOW TO POST thread

Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by Gibbon1 » Thu Oct 23, 2014 1:05 am

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.

Post Reply