Page 1 of 1

other compilers

Posted: Mon Oct 25, 2010 4:37 am
by ray62202
I am evaluating CodeLite for use in my operation.

I'm impressed to see multiple builds within a project/workspace are available, I would use use this feature extensively. I'm trying to figure out how to add a compiler not listed in the project settings. Is this possible? I routinely use an embedded compiler (WinAVR), and a Win32 compiler (console mode). The GCC compiler will suffice for the Win32 compiler, but how do I add WinAVR to build.

I see that external make files can be used, so I'll have to do some further study to use what I've got already.

- Ray

Re: other compilers

Posted: Mon Oct 25, 2010 10:23 am
by eranif
Settings | Build Settings

and click 'New Compiler'

Give the new compiler a name, and fill in the toolchain + regular expressions to parse errors/warnings (so that the output will be clickable)

Once you add a new compiler, it will be available in the 'Project Settings" compilers list

Eran

Re: other compilers

Posted: Mon Oct 25, 2010 8:45 pm
by ray62202
Thanks for the info, I'll try to create a new one soon.

On a somewhat related note, MinGW 4.4.1 was installed with CodeLite. How would I go about changing to a newer version of GCC?
I haven't yet found where to specify the path to the GCC compiler.

Re: other compilers

Posted: Mon Oct 25, 2010 9:36 pm
by eranif
Option 1:

From the main menu: Setting | Environment Variables
And add this line:

Code: Select all

PATH=C:\Path\To\New\MinGW\bin;$(PATH)
Replace: C:\Path\To\New\MinGW\bin with the actual path

This will prepend the bin directory of the new MinGW to the $(PATH) env variable.

Option 2:
From the main menu: "Settings | Environment Variables"

Add new variable:

Code: Select all

MY_MINGW=C:\Path\To\MinGW\bin
Now go to (from the main menu) "Settings | Build Settings | Compilers"
Select the compiler you want, and select the 'Tools' node in the tree of the compiler you want.
Prepend all the tools with the variable you defined:
so for example, the tool "C++ Compiler Name" changes from:
g++ into $(MY_MINGW)\g++

Option 3:
Use same method as option 2, but with hard coded paths

Option 4:
Open the 'Tools' page of the compilers you want (same as options 2/3) and update the PATH variable from there
IMPORTANT: Make sure you Append the $(PATH) to itself

A good example:

Code: Select all

PATH=C:\Path\To\New\MinGW\bin;$(PATH)
Eran

Re: other compilers

Posted: Tue Oct 26, 2010 5:24 am
by ray62202
Thanks for all your help, Eran.
I'll try your suggestions. Multiple compilers are always such a hassle.

- Ray