PDA

View Full Version : selecting g++ version


kroiz
October 27th, 2005, 07:19 AM
hi,
I got something I that need to be compiled with g++ 3.3 but I got g++ 4 installed.
can I apt-get g++ 3.3 and then somehow instruct the make to use it?
or maybe just uninstall g++ 4?

darth_vector
October 27th, 2005, 08:05 AM
it should be backwards compatible. have you tried building the source with 4.0?

kroiz
October 27th, 2005, 08:18 AM
it should be backwards compatible. have you tried building the source with 4.0?

yes I did but I get some compiling errors. I guess 4 is more strict.

toojays
October 27th, 2005, 08:23 AM
You can install the package g++-3.3, and get your project to use it by setting the environment variable CXX=g++-3.3 before you run the configure script.

thumper
October 27th, 2005, 08:42 AM
Don't forget to export it.
export CXX=g++-3.3

kroiz
October 27th, 2005, 08:48 AM
You can install the package g++-3.3, and get your project to use it by setting the environment variable CXX=g++-3.3 before you run the configure script.
great thanks. I dont have a configure script but I managed to do it like this:

make target CXX=g++-3.3