other compilers

General questions regarding the usage of CodeLite
ray62202
CodeLite Curious
Posts: 3
Joined: Mon Oct 25, 2010 4:31 am
Genuine User: Yes
IDE Question: C++
Contact:

other compilers

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: other compilers

Post 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
Make sure you have read the HOW TO POST thread
ray62202
CodeLite Curious
Posts: 3
Joined: Mon Oct 25, 2010 4:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: other compilers

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: other compilers

Post 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
Make sure you have read the HOW TO POST thread
ray62202
CodeLite Curious
Posts: 3
Joined: Mon Oct 25, 2010 4:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: other compilers

Post by ray62202 »

Thanks for all your help, Eran.
I'll try your suggestions. Multiple compilers are always such a hassle.

- Ray
Post Reply