How to install gcc/g++ 4.4 and make links

5,236

Just install the gcc-4.4 Install gcc-4.4 and g++-4.4 Install g++-4.4 packages and make sure you call the right compiler version on the command line, e.g.

g++-4.4 [options]

Depending on the source you are trying to compile, you can usually specify the compiler in the Makefile.

You might want to switch the default compiler on your system by telling Ubuntu this using update-alternatives, e.g.

update-alternatives --config cc
update-alternatives --config c++

Note that this is a system-wide setting, so I would not recommend doing this unless compiling this source is the only purpose of this system.

Share:
5,236

Related videos on Youtube

user2261693
Author by

user2261693

Updated on September 18, 2022

Comments

  • user2261693
    user2261693 over 1 year

    Because I cannot compile some code by gcc/g++ 4.7, I want to install gcc/g++ 4.4.

    I searched the Internet and found some different way. I don't know what is the best solution.

    Is it possible to choose what version I want to use without make a "gcc" link again?