Page 1 of 1

Compiler and Linker Options

Posted: Sat Jul 26, 2014 2:14 pm
by LairdTurner
Hello!

I'm running codelite on OSX and have a custom build release and debug version made.
A standard compiler option is for example is '-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)'.
I've added the location of my wxWidgets to my global search path, but codelite doesn't find the wx-config.

I don't want to edit my project files everytime and add the global path for the linker and compiler options.
Is it possible to say codelite to use the global system PATH?


Thanks!


greetings

-René

Re: Compiler and Linker Options

Posted: Sat Jul 26, 2014 3:48 pm
by frank_frl
Hi René,

this is how I do it:
In the CL's environment variables I have the path to WxWidgets like WXWIN=~Dev/wxWidgets-3.0.1
Compiler: `$(WXWIN)/ReleaseMacUnicode/wx-config --inplace --cxxflags`
Linker: `$(WXWIN)/ReleaseMacUnicode/wx-config --inplace --exec-prefix="$(WXWIN)/ReleaseMacUnicode" --libs --gl-libs`

You can save a template with this settings, so that when starting a new project they are already there. This way you can easily switch between different wxWidgets versions by just making a new environment with WXWIN set to an other path.

The environment settings in CL are very versatile I use them also for other build settings. Like I have $(STLIB) which is set to -stdlib=libc++ when i build on 10.9 with clang and expands to nothing when building on 10.7 with GCC. This way I can share the same project files for both builds and just use different environment settings.

My compiler setting looks like this:

Code: Select all

`$(WXWIN)/ReleaseMacUnicode/wx-config --inplace --cxxflags` $(ARCH) $(STLIB) -isysroot $(SDKPATH) -mmacosx-version-min=$(SDKNR) -O3 -Wall

Regards

Frank

Re: Compiler and Linker Options

Posted: Tue Aug 26, 2014 1:04 pm
by LairdTurner
Thanks!

I'll try it this way, sorry for the delay. The last weeks been very turbulent! :-)


greets

-René