How to change default gcc and g++ version
Hi
After installing RHEL 7.2 and Dev. Tool 4.1, the system gcc is 4.8.5 and the gcc used by eclipse is 5.3.1.
Is it possible to change the default gcc version to the one used by the dev. toolset?
And, are there any adverse effects to doing this?
Thanks
Responses
Hi Henrik,
Software Collections aren't really designed to serve as the default. That said, it's possible to set up an environment that uses the versions provided by Software Collections (such as DTS):
- Permanently Enable a Software Collection
- How to use Red Hat Software Collections in scripts and cron jobs
- How can I make a Red Hat Software Collection persist after a reboot/logout?
There shouldn't be any adverse effect, but you should keep in mind potential compatibility issues. See 'Compatibility' in the DTS User Guide.
Hi Henrik,
I'm not familiar with NSight, but yes, that's how it should work. Just use the scl command to launch your application. To quote from the DTS User Guide:
Note that you can execute any command using the scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent.
This would look like the following in your case:
scl enable devtoolset-4 'nsight'
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
