Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: idhan on March 16, 2007, 03:56:39 PM

Title: [SOLVED] how to set g++-4.1 for code::blocks
Post by: idhan on March 16, 2007, 03:56:39 PM
Hi,

I can't compile because I get the follow message:

/bin/sh: g++: not found

I am using g++-4.1 (actually I have already compile wxgtk2.8.2 with g++-4.1), but code::blocks do not use this compiler.
I have setting the variable CXX=g++-4.1 on linux kubuntu edge 6.10.
Where in CB can I set the compile version of g++???

thanks in advance.
Title: Re: how to set g++-4.1 for code::blocks
Post by: indigo0086 on March 16, 2007, 04:25:32 PM
G++ comes with mingw along with other compilers, you have to have it all in the mingw directory and codeblocks automatically locates it.
Title: Re: how to set g++-4.1 for code::blocks
Post by: wxLearner on March 16, 2007, 04:32:31 PM
Hello, the currently used compiler normally has a symbolic link. Either open your console and create the links:

sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.1 /usr/bin/g++

Or install the virtual packages, that will use the stable version:

sudo apt-get install g++
Title: Re: how to set g++-4.1 for code::blocks
Post by: Pecan on March 16, 2007, 04:51:48 PM
Quote from: idhan on March 16, 2007, 03:56:39 PM
Hi,

I can't compile because I get the follow message:

/bin/sh: g++: not found

I am using g++-4.1 (actually I have already compile wxgtk2.8.2 with g++-4.1), but code::blocks do not use this compiler.
I have setting the variable CXX=g++-4.1 on linux kubuntu edge 6.10.
Where in CB can I set the compile version of g++???

thanks in advance.

Quote from: Pecan on March 16, 2007, 12:00:47 PM
Make sure the path to your tool chain has been specified to CB.

MainMenu=>Setting=>Compiler&Debugger=>Global Compiler Settings Settings/Tool Chain executables

(http://img221.imageshack.us/img221/6964/161bg7.png)
Title: Re: how to set g++-4.1 for code::blocks
Post by: TDragon on March 16, 2007, 04:52:54 PM
Quote from: indigo0086 on March 16, 2007, 04:25:32 PM
G++ comes with mingw along with other compilers, you have to have it all in the mingw directory and codeblocks automatically locates it.
indigo0086: idhan is using Kubuntu Linux, not Windows.

idhan: What Pecan said.
Title: Re: how to set g++-4.1 for code::blocks
Post by: idhan on March 16, 2007, 05:09:07 PM
thanks a lot, If found the right setting :-)