> Specifically, there were changes to std::chrono::system_clock, and >std::error_category, and std::condition_variable. >If those types are used in the old dynamic libraries, particularly >across the library API boundary, then you are likely to run into problems. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If the aforementioned types are only used in the implementation of the library which is compiled with 4.9.4 and the interface of the library is a C interface. If I understand you correctly, there is no potential problem if a binary program is compiled with g++11.0.3 and is linked to the said library. Am I right? Best regards On Mon, Nov 7, 2022 at 9:02 PM Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > > On Mon, 7 Nov 2022 at 02:11, 孙世龙 via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > > > There are dynamic libraries provided by others, which are out of my control. > > > > What I know is that most of the aforementioned libraries are compiled > > by g++4.9.4 & g++4.8.4 with C++11 support, and some libraries are > > compiled by g++11.1.0 with C++14 support. > > > > And I have to use newer g++ which supports C++17 to compile my > > project. I intend to use g++11.3.0 on Ubuntu20.4. > > > > Is there any potential problem I should be aware of when linking to > > dynamic libraries compiled by the said old version g++ ? > > Yes, this is not supported. > > C++11 support in GCC 4.8 and 4.9 was experimental and unstable, and is > not ABI compatible with C++11 code compiled by GCC 5 or later. > > Specifically, there were changes to std::chrono::system_clock, and > std::error_category, and std::condition_variable. If those types are > used in the old dynamic libraries, particularly across the library API > boundary, then you are likely to run into problems. There are probably > other incompatibilities that I'm forgetting. I don't bother to > remember all the incompatibilities, because what you're trying to do > is not supported and so I don't spend any effort memorising all the > ways it can fail.