Can a binary which was compiled using C++11 be used in a c++14/17 project? What about a c++14 binary library in a c++17 project?
Or would the source code need to be updated and recompiled using the same standard as the project?
Are there any other ways to include older standard C++ libraries in new standard projects?
The C++ standard has nothing todo with the file format of the binary. That only depends on the compilers/linkers and the OS. So if the compiler vendor changes the ABI ( Application binary interface ), you can not simply link the parts together.
As you can read here, only relevant for gcc:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
gcc introduces with gcc5.1 a new ABI. A history of versions of libraries from gcc and maybe comments to ABI changes can be found here:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
So changing from one C++ version to another did not change the ABI but changing the compiler can.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With