How to install older g++ (4.1 or 4.2) compiler on ubuntu 10.10?

Asked by Attila Miklosi

I've recently upgraded my ubuntu to 10.10 version and i was suprised that older version of g++ are not available any more. How can i install older versions of g++? I badly need an older version to maintain 5 years old sources...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Attila Miklosi
Solved:
Last query:
Last reply:
Revision history for this message
DieterVDW (dietervdw) said :
#1

I am in the same situation. Some help would be appreciated.

Revision history for this message
DieterVDW (dietervdw) said :
#2

I am in the same situation. Some help would be appreciated.

Revision history for this message
Attila Miklosi (amiklosi) said :
#3

I finally solved the problem by downloading the g++ packages from http://www.debian.org/distrib/packages and installing them manually. All you need to do is to open the packages with the file-roller and copy the files where the folder structure in the package tells you to (/usr/lib/, usr/bin etc.).
After i copied the files i created a symlink in /usr/lib/gcc/i486-linux-gnu to point the folder where c++ files are (/usr/lib/gcc/i486-linux-gnu/4.1) :

ln -s /usr/lib/gcc/i485-linux-gnu/4.1 /usr/lib/gcc/i486-linux-gnu/4.1.3

And finally i replaced the g++ symlink in /usr/bin folder:

ln -sf /usr/bin/g++-4.1 /usr/bin/g++

I hope this helps you. It worked for me...

The packages i downloaded:
g++-4.1_4.1.2-25_i386.deb
gcc-4.1_4.1.2-25_i386.deb
gcc-4.1-base_4.1.2-25_i386.deb
libstdc++6-4.1-dev_4.1.2-25_i386.deb