LMSouq
server-admin Open

How to change the default GCC compiler in Ubuntu?

RO
RoboAlex
1 month ago
3 views
Problem Description
I have installed gcc-3.3/g++-3.3 on ubuntu 11.04 which already has gcc/g++-4.4. So in my system both gcc-3.3 and 4.4 are available. I am able to call both compilers as I want. If I just call the command `gcc` then gcc-4.4 will get called. To call gcc-3.3, I have to use the command `gcc-3.3`. How can I change the default compiler as gcc-3.3? When I execute the command `gcc` it should call the gcc-3.3 and not gcc-4.4. In addition, how can I change the variable CXX in a make file to gcc-3.3? I wish to change one common global place in the system instead of changing all make files.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base