Trouble compiling CodeLite

CodeLite installation/troubleshooting forum
SlimFast
CodeLite Enthusiast
Posts: 43
Joined: Fri Jun 17, 2011 9:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Trouble compiling CodeLite

Post by SlimFast »

Hi all,
after a while I tried again to compile CodeLite myself but it seems I always run into trouble.
I do have the sources in a path with spaces (and actually I don't really want to change that).
When I start compiling I immediately get an error:

Code: Select all

g++: error: Files: No such file or directory
...and so on.
The command line looks like:

Code: Select all

g++ -c  precompiled_header_release.h -O2 -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:\My Files\CodeLite\wxWidgets\lib\gcc_dll\mswu -IC:\My Files\CodeLite\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -fno-keep-inline-dllexport    -I. -I. 
So you see where the trouble comes from: The include directories are not being quoted. I thought I can quickly change that, but the wx-config tool is used to get all these parameters in once and I didn't find a setting to "force" quotes around include paths (I guess it's the same for the linker / resource compiler etc...).

So... do I have to manually adjust the flags not using wx-config, or can I (somehow) force CodeLite/wx-config to use quotes or 8.3 file names? I recall Code::Blocks offered an option to quote path's if needed and I was hoping I can do the same with CodeLite?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CodeLite

Post by eranif »

SlimFast wrote: CodeLite/wx-config to use quotes or 8.3 file names?
You can change the source code of wx-config and build yourself a custom one that adds quotes around the include paths

HOWEVER, you will fail at the stage of 'windres' (which is used to compile .rc files on Windows), windres does not accept paths with spaces period.
SlimFast wrote:I don't really want to change that
In that case we can't really help you

Eran
Make sure you have read the HOW TO POST thread
SlimFast
CodeLite Enthusiast
Posts: 43
Joined: Fri Jun 17, 2011 9:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CodeLite

Post by SlimFast »

Thanks for the fast help!
eranif wrote:You can change the source code of wx-config and build yourself a custom one that adds quotes around the include paths
OK, I'll do that. Probably that should be the default- or at least adjustable with a command line option.
eranif wrote:HOWEVER, you will fail at the stage of 'windres' (which is used to compile .rc files on Windows), windres does not accept paths with spaces period.
I know about that issue, too. But here, converting the path's to 8.3 notation is working just fine. So the rules are like that: For compiler and linker, put quotes around path's with spaces, for the resource compiler convert into 8.3 notation. Than (so my personal experience from Makefiles) it will always work on Windows.
eranif wrote:
SlimFast wrote:I don't really want to change that
In that case we can't really help you
A pity to see that even in the 21st century there is still an issue with spaces in the path. However, I understand its not CodeLite's fault. :-( I just wish I could find a way to handle this nicely transparent from the user. Especially newbies this hits over and over again, as most default-folders on Windows have spaces in the path.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CodeLite

Post by eranif »

SlimFast wrote: Probably that should be the default- or at least adjustable with a command line option.
I am not the maintainer of this tool - you can fix it and submit us with a modified one.
SlimFast wrote:as most default-folders on Windows have spaces in the path
This is not true for Windows 7 ...

The paths were modified:
C:\Users\eran

%appdata% => C:\Users\eran\AppData\Roaming

(As opposed to Windows XP)

Eran
Make sure you have read the HOW TO POST thread
SlimFast
CodeLite Enthusiast
Posts: 43
Joined: Fri Jun 17, 2011 9:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble compiling CodeLite

Post by SlimFast »

eranif wrote:
SlimFast wrote: Probably that should be the default- or at least adjustable with a command line option.
I am not the maintainer of this tool - you can fix it and submit us with a modified one.
Done. I've attached a patch accordingly. It adds a flag "--use-quotes" to the wx-config tool and acts accordingly (Windows only). This works very well on all of my machines.

BTW: Who is maintaining this? Should I better post the patch somewhere else?
You do not have the required permissions to view the files attached to this post.
Post Reply