If you say that your project is built with one version of the C ++ compiler, and its potential target system provides shared libraries created with another version, how is this usually suitable? In particular, this is a question about libstdc ++.
When something is built inside the same distribution (for example, on Linux, etc.), it is quite simple - everything is built with the same compiler. But what about projects like Mozilla Firefox that deliver a binary supposedly compatible with many potential objects? I know that one way to do this is to statically link C ++ dependencies, which reduces ABI incompatibility issues and limits external linking to only a few C libraries, but when I look at the actual Firefox binary (from the Mozilal collection for Linux x86_64), I see it
ldd firefox linux-vdso.so.1 (0x00007fff561fc000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff868c9f000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff868a9b000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff868892000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff868587000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff868286000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff86806f000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff867cc6000) /lib64/ld-linux-x86-64.so.2 (0x00007ff868ee8000)
Here, Firefox dynamically binds to libstdc ++. So, how can it work in different versions of libstdC ++ or just assumes compatibility with ABI and what is it?
c ++ linux
shmerl
source share