Problem compiling anything?

CodeLite installation/troubleshooting forum
bananasgomoo
CodeLite Curious
Posts: 4
Joined: Thu Aug 13, 2015 6:19 am
Genuine User: Yes
IDE Question: C++
Contact:

Problem compiling anything?

Post by bananasgomoo »

Hello. I just installed CodeLite 8.2, and I can't seem to compile anything. I've set up TDM-GCC 5.1.0 and when I try to compile Hello World, I get the following error:

Code: Select all

C:\Windows\system32\cmd.exe /C "C:/Program Files (x86)/CodeBlocks/MinGW64/bin/mingw32-make.exe" -j8 SHELL=cmd.exe -e -f  Makefile
"----------Building project:[ testing - Debug ]----------"
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make.exe: *** [All] Error 1
Makefile:4: recipe for target 'All' failed
1 errors, 0 warnings

When I see this, I think that it needs double quotes around it, but in the log, it says that there is, so I'm not sure why it's doing this. Any ideas?

I'm on Windows 10 Pro x64.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by eranif »

Hi,

Please make sure that the option: Settings->Global Editor Preferences->Terminal->Windows only: commands executed with CMD.EXE ...
is enabled

Eran
Make sure you have read the HOW TO POST thread
bananasgomoo
CodeLite Curious
Posts: 4
Joined: Thu Aug 13, 2015 6:19 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by bananasgomoo »

eranif wrote:Hi,

Please make sure that the option: Settings->Global Editor Preferences->Terminal->Windows only: commands executed with CMD.EXE ...
is enabled

Eran
Hello,

I tried enabling that, but I get the same error, but now with twice as many quote marks as last time in the error.

It seems to work if I use a path with no spaces for my compiler, but it should work with spaces, so I dunno what's wrong.

Code: Select all

C:\Windows\system32\cmd.exe /C ""C:/Program Files (x86)/CodeBlocks/MinGW64/bin/mingw32-make.exe" -j8 SHELL=cmd.exe -e -f  Makefile"
"----------Building project:[ test - Debug ]----------"
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make.exe: *** [All] Error 1
Makefile:4: recipe for target 'All' failed
1 errors, 0 warnings
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by eranif »

can you try to run this from the command line?

Code: Select all

C:\Windows\system32\cmd.exe /C ""C:/Program Files (x86)/CodeBlocks/MinGW64/bin/mingw32-make.exe" -j8 SHELL=cmd.exe -e -f  Makefile"
Eran
Make sure you have read the HOW TO POST thread
bananasgomoo
CodeLite Curious
Posts: 4
Joined: Thu Aug 13, 2015 6:19 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by bananasgomoo »

eranif wrote:can you try to run this from the command line?

Code: Select all

C:\Windows\system32\cmd.exe /C ""C:/Program Files (x86)/CodeBlocks/MinGW64/bin/mingw32-make.exe" -j8 SHELL=cmd.exe -e -f  Makefile"
Eran
Hello,

it gives me the same error in the cmd (ran as administrator, just in case). Maybe something else is wrong? I'm not sure, since it works fine when I use MinGW in Code::Blocks as my IDE.
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by Gibbon1 »

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

Re: Problem compiling anything?

Post by eranif »

Does this work for you from the command line (notice that this command ends with "" and not with a single "):

Code: Select all

C:\Windows\system32\cmd.exe /C ""C:/Program Files (x86)/CodeBlocks/MinGW64/bin/mingw32-make.exe" -j8 SHELL=cmd.exe -e -f  Makefile""
Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by eranif »

This should be fixed now.
The problem was in the generated makefile and not with the way codelite was running the make
The variable $(MAKE) inside the generated makefile should also be wrapped with double quotes

I plan on uploading new build for Windows (8.2.1)

Eran
Make sure you have read the HOW TO POST thread
bananasgomoo
CodeLite Curious
Posts: 4
Joined: Thu Aug 13, 2015 6:19 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by bananasgomoo »

thanks! everything is fixed. I'm amazed how fast that was resolved.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem compiling anything?

Post by eranif »

bananasgomoo wrote:thanks! everything is fixed.
Good to hear that!

Eran
Make sure you have read the HOW TO POST thread
Post Reply