How can I switch between g++ 4.5 4.6 4.7 versions in Debian Squeeze? (6.0.5)
Debian comes with 4 preinstalled version of g++ from 4.4 to 4.7.
What do I have to do to choose which version of g++ will be the default compiler in console when i ?g++ -std=gnu++0x -lpthread code.cpp -o ExeFile Quote:
|
Examples using the non default compilers
( default = /usr/bin/ gcc g++ ) : 1. gcc-4.4 hello.c -o hello 2. export CC=gcc-4.4 CXX=g++-4.4 && <other-command>, like : export CC=gcc-4.4 CXX=g++-4.4 && ./configure && make 3. CC=gcc-4.4 CXX=g++-4.4 cmake ../ Also : The default compiler can be changed : # update-alternatives --config gcc .... If you then choose e.g. version 4.7, the links in /usr/bin/ will be set to point to gcc-4.7 / g++-4.7 . . |
so simple as i immagined. I also had cought somewhere thatupdate alternatives command and was supposing it would have something to do. thank you
|
All times are GMT -5. The time now is 03:38 PM. |