Hi, I need to install an newer version of gcc. According to my system, I have the version 4.8:
viniciusbr@linux-wu6s:~> gcc --version
gcc (SUSE Linux) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
However, in my folder /usr/include/c++ are two subfolders: 4.8 and 5.
In yast I also have the gcc6 installed.
So, I suppose that there are more gcc versions installed in my system. What can I do to use the last one? If I remove the oldest ones, a lot of packages will be remove too and I don’t think that is safe.
A gcc is used only to compile code.
Once compiled, the gcc is not needed anymore so you can disable, switch to another version, upgrade or whatever without affecting the compiled code.
When you compile using a specific gcc when you have multiple versions on your system, you can either specify the gcc binary in your make script or use an update-alternatives to switch between gcc versions on your system following the Wiki guide I create at the following link