Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

After executing the following on Ubuntu 12.10 how do I set 4.8 to be the default C++ compiler?

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8

When I check the version it says I have 4.6 by default. I'd like to change this to 4.8.

share|improve this question
add comment

closed as off-topic by slm, jasonwryan, rahmu, warl0ck, Michael Mrozek Nov 7 '13 at 4:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – Michael Mrozek

1 Answer

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

Choose gcc 4.8 version in both cases.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.