C++ 20 project compilation with external libraries

Viewed 61

I have a C++ 11 (currently compiling with GCC 4.8.5) project using C++ 11 static built (with GCC 4.8.5) external dependencies.

I would like to know if I need to compile these external dependencies with C++ 20 (GCC 9.2.0) to compile my project with C++ 20 (GCC 9.2.0) ?

1 Answers

If you are including the file, it should be compatible as higher C++ version as C++ updates simply add more features. C++ code in a lower version should work in a higher version. So I recommend including the file but compiling separately should work too.

Related