Switching between MinGW installations

General questions regarding the usage of CodeLite
User avatar
eranif
CodeLite Plugin
Posts: 5779
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Switching between MinGW installations

Postby eranif » Thu Jan 02, 2014 9:54 am

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
Make sure you have read the HOW TO POST thread
wwashington
CodeLite Curious
Posts: 8
Joined: Tue Dec 31, 2013 12:33 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Switching between MinGW installations

Postby wwashington » Fri Jan 03, 2014 8:30 pm

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
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 5779
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Switching between MinGW installations

Postby eranif » Fri Jan 03, 2014 11:14 pm

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
Make sure you have read the HOW TO POST thread
Jarod42
CodeLite Expert
Posts: 176
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Switching between MinGW installations

Postby Jarod42 » Sat Jan 04, 2014 6:29 pm

@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...).

Who is online

Users browsing this forum: No registered users and 14 guests