oqgraph-dev team mailing list archive
-
oqgraph-dev team
-
Mailing list archive
-
Message #00061
Re: build errors 2013-02-25
Hi
> I thought that ubuntu has a way for choosing gcc/g++ version without having to
> manually symlink.
Use update-alternatives
Example:
$ update-alternatives --list editor
/bin/ed
/bin/nano
/usr/bin/emacs23
/usr/bin/mcedit
/usr/bin/vim.basic
/usr/bin/vim.gtk
/usr/bin/vim.tiny
$ sudo update-alternatives --config editor
# Presents a menu allowing you to choose
$ update-alternatives --list g++
update-alternatives: error: no alternatives for gcc.
But I have g++-4.3 and g++-4.4 installed, not sure why Squeeze hasn't set
this up; it already was for me on OpenSuse 11.4. Anyways:
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.3 10
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 20
update-alternatives: using /usr/bin/g++-4.4 to provide /usr/bin/g++ (g++) in
auto mode.
$ update-alternatives --list g++
/usr/bin/g++-4.3
/usr/bin/g++-4.4
Now its all set up, you can simply
$ sudo update-alternatives --config g++
and choose the one you want it to be
HTH,
Andrew
--
https://launchpad.net/~andymc73
http://blog.oldcomputerjunk.net
Twitter: @andymc73
GPG: http://www.andrewmcdonnell.net/gpg.html
References