简体   繁体   中英

Compile for c++14 on CentOS 6

I have a C++ program that uses various C++14 features, and have been asked to compile it for a CentOS 6 system. GCC doesn't support C++14 features on CentOS 6 as far as I can tell (and based on compiler errors).

Is it possible to compile for C++14 on CentOS 6?

Assuming someone has created a whole compatibility layer for compiling C++14 on CentOS6, could I even distribute that executable? Or would the target machine ALSO have to install a compatibility layer?

No, it is not possible to compile C++14 on CentOS 6. Only some C++11 features are available on CentOS 6.

CentOS runs GCC 4.4.7 where-in C++14 features start to become available with GCC 4.9 and higher .

The Boost libraries may be used to replicate some modern C++ features if on an outdated GCC version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM