Page 1 of 1

Switching between MinGW installations

Posted: Thu Jan 02, 2014 9:54 am
by eranif
There are 4 ways to tell codelite to use a different MinGW toolchain:

Lets assume that your current MinGW is 4.7.1, installed under C:\MinGW-4.7.1 and you wish to move to MinGW-4.8.1 which is installed under
C:\MinGW-4.8.1

So to do this, we have 4 options:

Option 1: use the the compiler environment variables
  • From the main menu, go to: Settings -> Build Settings -> Compilers -> gnu g++ -> Tools
  • Update the "PATH environment variable" field to include the bin folder of the new installation like this:

    Code: Select all

    PATH=C:\MinGW-4.8.1\bin;$PATH
Option 2: use the global environment variables
Similar to option 1, but this one affects "globally"
  • From the main menu, go to: Settings -> Environment variables
  • Add a line that updates your PATH environment variable with the bin folder of your MinGW's bin folder:

    Code: Select all

    PATH=C:\MinGW-4.8.1\bin;$PATH
Option 3: use codelite's registry.ini file
  • Close codelite
  • Open the file under codelite installation folder named "registry.ini"
  • Under the [environment] section, change the value of mingw to point to your MinGW installation C:\MinGW-4.8.1 (_not_ the bin folder)
Option 4: Use full paths
  • From the main menu, go to: Settings -> Build Settings -> Compilers -> gnu g++ -> Tools
  • Replace all the tools with full paths (e.g. instead of plain "g++", use: C:\MinGW-4.8.1\bin\g++.exe)
Eran

Re: Switching between MinGW installations

Posted: Fri Jan 03, 2014 8:30 pm
by wwashington
Hi Eran, did you ever think of adding a Gcc Profile for user choices in Drop Menu?
Below is the CFree's screen picture, people can define compilers and choose one.

http://www.programarts.com/cfree_en/download.htm
C-Free Download - An Excellent C/C++ IDE
CFree_Gcc_Profile.jpg

Re: Switching between MinGW installations

Posted: Fri Jan 03, 2014 11:14 pm
by eranif
Developing new features takes time. The content for 5.4 is almost closed and I also know what I want to add for codelite 6.0
You are welcome to download the sources and add features (patches are most welcomed!)

Eran

Re: Switching between MinGW installations

Posted: Sat Jan 04, 2014 6:29 pm
by Jarod42
@wwashington: You may create a 'new compiler' to have several version of gcc (using option 1 or 4).
then you change your compiler in the project settings (So you can switch between gcc 4.7 to 4.8 or clang...).