tags:

views:

268

answers:

3

I am using Ubuntu 9.10
For a particular piece of code I require GCC 3.2 but I have a higher version. Is it possible to install multiple versions and use whichever one I want to ?

A: 

It is possible to have more than one, but they need to be named differently and installed to different folders. See tutorials for building cross-compiling GCC but do not build for different architecture. However, note that compiling GCC yourself is rather difficult, so fixing the application that you need to compile might be easier.

Tronic
I canno fix the application
+1  A: 

yes, you can have multiple installations. You can invoke specific version using gcc-3.2. you can search repository using apt-cache search gcc-3 to find a package to install using apt-get install. quick search shows only gcc-3.3 in repository, if that version does not work for you, you have to dig a bit more or install by hand. Other poster gave more details

Consider accepting previous answers to questions you have been answered, otherwise you will not get responses.

aaa
+1  A: 

Have you searched the Ubuntu package archive for gcc ?

If gcc 3.3 is ok, you could download the gcc-3.3 and related .deb packages for dapper and I suspect it will install and happily co-exist with the gcc 4.4 you get with karmic. (You'll have to be sure to invoke it as gcc-3.3.)

Otherwise you would have to:

  • download the relevant gcc source bundle
  • build it yourself with an installdir some place out of the way like /opt/gcc-3.3
  • make sure to set your PATH correctly when you need it.
crazyscot