Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 114

Using newer version of gcc compilers on Centos 6.x (devtoolset-3) with icc

$
0
0

Our primary development platform on Linux is Centos 6.7  with Composer XE 2015 - the default gcc version is 4.4.7. We need to use C++11 and STL features as supported by gcc 4.9.2. This gcc version can be installed and activated by installing "devtoolset-3" and "enabled"  via "source /opt/rh/devtoolset-3/enable".

I am found two confusing issues. If I compile a C++ file that uses , for example, C++11 <regex> features  this is what I find

Using gcc 4.4.7 : gcc sample.cpp ->does not compile as 4.4.7 does not support std::regex properly

Using gcc 4.9.2 : gcc sample.cpp ->compiles OK, but fails to link with many errors related to "regex".

Using icc ( in gcc 4.9.2 environment)  icc sample.cpp-> compiles AND links and runs OK

I don't really understand why

  • gcc 4.9.2 compiles but does not link to the correct libraries.

while

  • icc ( in gcc 4.9.2 environment) compiles and links (and runs in the default environment)

 

 


Viewing all articles
Browse latest Browse all 114

Trending Articles