Can't compile g++ simple console executable.

CodeLite installation/troubleshooting forum
m75
CodeLite Enthusiast
Posts: 10
Joined: Mon May 06, 2013 2:16 am
Genuine User: Yes
IDE Question: c++
Contact:

Can't compile g++ simple console executable.

Post by m75 »

hello.
I installed the codelite-5.1.0-mingw4.7.1-wx2.9.4.exe on Windows XP sp3.
The Codelite is installed in the directory c:\Codelite.
The Mingw is installed in the directory c:\Mingw-4.7.1.
I added the path in windows c:\Mingw-4.7.1\bin.
When trying to compile the g++ simple console executable from template project

Code: Select all

#include <stdio.h>

int main(int argc, char **argv)
{
	printf("hello world\n");
	return 0;
}
I get an error like this:

Code: Select all

C: \ WINDOWS \ system32 \ cmd.exe / c "mingw32-make.exe-j 1-e-f" Hello_world_wsp.mk ""
---------- Building project: [hello_world - Debug] ----------
mingw32-make [1]: Entering directory `C :/ Devel/w32/Codelite/hello_world '
mingw32-make [1]: *** [Debug / .d] Error 259
Hello_world.mk: 88: recipe for target `Debug / .d 'failed
mingw32-make [1]: Leaving directory `C :/ Devel/w32/Codelite/hello_world '
mingw32-make.exe: *** [All] Error 2
Hello_world_wsp.mk: 4: recipe for target `all 'failed
0 errors, 0 warnings
Can anyone help me solve this problem?
Greetings.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't compile g++ simple console executable.

Post by eranif »

Is this a copy / paste of the build output? What's with all the spaces?
Can u confirm that you have write permissions to the workspace folder?

Eran
Make sure you have read the HOW TO POST thread
m75
CodeLite Enthusiast
Posts: 10
Joined: Mon May 06, 2013 2:16 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Can't compile g++ simple console executable.

Post by m75 »

Hi.
This is a copy / paste of the build output.
I have write permission to the workspace folder (C:\Devel\w32\Codelite\hello_world).
Greetings.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't compile g++ simple console executable.

Post by eranif »

For some reason I see some extra spaces like in

Code: Select all

Debug/ .d
I have edited your original post (used code tags for monospace font)
Can you try and run the executed command from the command line? maybe codelite is omitting something that the shell that won't?

Eran
Make sure you have read the HOW TO POST thread
m75
CodeLite Enthusiast
Posts: 10
Joined: Mon May 06, 2013 2:16 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Can't compile g++ simple console executable.

Post by m75 »

Hi.
In the shell command line commands I typed command g++ main.cpp -o Hello.exe.
Hello.exe built properly.
Greetings.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't compile g++ simple console executable.

Post by eranif »

What I meant:
type the exact command as codelite does:

Code: Select all

C: \ WINDOWS \ system32 \ cmd.exe / c "mingw32-make.exe-j 1-e-f" Hello_world_wsp.mk ""
Eran
Make sure you have read the HOW TO POST thread
m75
CodeLite Enthusiast
Posts: 10
Joined: Mon May 06, 2013 2:16 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Can't compile g++ simple console executable.

Post by m75 »

Hi.
Don't work :-(.
Greetings.

Code: Select all

C:\Devel\w32\Codelite\hello_world>mingw32-make.exe -j 1 -e -f Hello_world_wsp.mk

----------Building project:[ Hello_world - Debug ]----------
mingw32-make[1]: Entering directory `C:/Devel/w32/Codelite/hello_world'
Hello_world.mk:88: recipe for target `Debug/.d' failed
mingw32-make[1]: *** [Debug/.d] Error 259
mingw32-make[1]: Leaving directory `C:/Devel/w32/Codelite/hello_world'
Hello_world_wsp.mk:4: recipe for target `All' failed
mingw32-make.exe: *** [All] Error 2
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't compile g++ simple console executable.

Post by eranif »

Can you please upload the makefile? Hello_world_wsp.mk

Eran
Make sure you have read the HOW TO POST thread
m75
CodeLite Enthusiast
Posts: 10
Joined: Mon May 06, 2013 2:16 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Can't compile g++ simple console executable.

Post by m75 »

Hi.
I'll upload files until late in the evening when I get home.
Thank you for your help.
Greetings.
m75
CodeLite Enthusiast
Posts: 10
Joined: Mon May 06, 2013 2:16 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Can't compile g++ simple console executable.

Post by m75 »

Hi.
In Annex I posted makefile project compiled on a different system (Windows7 64b) using an older version of Codelite ver_4.1.5770. This version works fine.
Also posted another makefile project that can not compile on my home computer (Windows XP sp3 32b) using the latest version of Codelite ver_5.1.
Greetings.
You do not have the required permissions to view the files attached to this post.
Post Reply