Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icpc , c++ fail std=c++14 with gcc version 4.8.5

Orlando_R_
Beginner
2,434 Views

Hello,

I  have observed an issue  with intel  c++ compiler   using old versions of g++  and support for std=c++14 and std=c++17

Short background :  We use an enterprise Linux Version,  SLES12SP4, and  by  default the compiler ist  gcc 4.8.5

A perfectly supported std c++14 code ( memory std::make_unique<myClass()>)   will not compile with icpc -std=c++14 -v 19.**   unless I  have added in the path a recent  version of gcc , for example 8.0.3  .   I have examined  the output of  icpc /g++   -E   and  icpc is using the CPP  found in the path ,  and the STL headers in the path of  CPP.

I always tought  , that  the icpc  has an integrated preprocessor, and also STL headers making it inmune to the current installed version of gcc .  There is  list of supported features c++14 c++17, but not sure if  there is no parallel to the recommended  gcc .

1) Is there  a parallel  of which gcc  suits best to icpc ?  Also icpc  2018 failed to build the code above ,  but icpc 2019  compiled it fine using the CPP-8.0.3

2) Is there a way , using a configuration file on enviroment to instruct / tell    icpc  where to find the preprocessor/gcc and STL librares?   a system-wide  export PATH is not  recommend in my case .  

Thanks

 

 

 

0 Kudos
2 Replies
Viet_H_Intel
Moderator
2,434 Views

How about adding -gxx-name=<name> to the command line?

0 Kudos
Orlando_R_
Beginner
2,434 Views

Yup !  that does the trick 

0 Kudos
Reply