View Full Version : [ubuntu] how to install gcc4.3 on Ubuntu10.04
kwanu
June 21st, 2010, 05:44 AM
Hi,
I am using Ubuntu10.04, but I want to use the gcc4.3.
As you know, there are gcc4.4 and gcc4.3 in Synaptic Package Manager, but if I select the gcc, the gcc4.4 is selected automatically.
So, do you guys know how can I choose the gcc4.3 instead of gcc4.4.
Thanks,
kwanu
June 21st, 2010, 05:34 PM
anybody knows that?
please, let me know...
Thanks,
3Miro
June 21st, 2010, 05:46 PM
First you need to install gcc 4.3 from Synaptic. Then it depends.
Case 1: If you are making your own program, then just use gcc-4.3 to compile your code (as opposed to simply gcc)
Case 2: If you have downloaded some program from the internet, then it probably comes with its own Makefile. You need to look for common.mk or whatever they have and edit it so that you are using gcc-4.3 as opposed to gcc.
Case 3: This not advisable, but if all else fails you can try it. gcc is actually only a link to gcc-4.4. What you need to do is to at least temporarily change the link to gcc-4.3. Don't leave it pointing to 4.3 since Ubuntu assumes gcc = gcc-4.4 and you may run into trouble.
To make gcc = gcc-4.3:
sudo ln -s /usr/bin/gcc-4.3 /usr/bin/gcc
Now compile whatever you need to compile.
To revert it back to the original
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
kwanu
June 21st, 2010, 06:45 PM
Thank you so much, 3Miro.
I can solve it.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.