Installing GCC 5.x

CentOS uses GCC 4.8.5 by default. To be able to build projects, raise the GCC version to 5.x.

To install GCC, run these commands:

sudo yum install centos-release-scl
sudo yum install devtoolset-4-gcc*
scl enable devtoolset-4 bash

The last line applies the new GCC version to the current bash session. To use this GCC version, you need to run S32 Design Studio from the command line in the same session.

Note: To run S32 Design Studio from the user interface with the required GCC version, specify the following command in the .profile file:
source /opt/rh/devtoolset-4/enable

When done, verify the version of the installed GCC using this command:

g++ --version

You will get the actual GCC version in the response similar to this one:

[af@vm-co7] $ g++ --version
g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)