How to setup gcc7 environment

Sometime I need to compile by gcc7/g++7. What else should be invoked to make gcc7 environment clean? I remember in RedHat/CentOS it was simple commands to switch to alternative dev environments. Do we have something similar in Clear?

1 Like

sudo swupd bundle-add c-extras-gcc7

Will install gcc7 in a prefix location. Adjust your CC/CXX environment variables according to use it, and remember to verify you’re not passing the default clearlinux compiler flags that likely only work with gcc9.

Yes, I have that installed. I changed CC and CXX. But smooth work for gcc7 requires more - referencing to the different include files and libraries. If I am using default include and libraries - it can lead to errors.