GLIBCXX versions GLIBCXX versions linux linux

GLIBCXX versions


Use readelf -a and objdump -x to inspect ELF files in preference to strings.

Actually, all the GLIBCXX_* versions don't apply to the entire library, but to each symbol (symbol versioning, see DSO-howto). So you can have e.g: std::char_traits<wchar_t>::eq@@GLIBCXX_3.4.5 and std::ios_base::Init::~Init()@@GLIBCXX_3.4 on the same library file.

The fact that your program needs GLIBCXX_3.4.9 probably means that it has been linked against a symbol that has been introduced/has changed semantics on GLIBCXX_3.4.9.


  1. That the the library version that is installed on your system. You couldmanually build the glibc version 3.4.14 and link to it
  2. That depends. Maybe the later version fixed some issues. The users of your program would have to link against the version that your program requires
  3. The memory usage is higher
  4. Yes, pass proper parameter to the linker. If you need specific version of the library, then it is best to download it, and build it manually, and link to it.

EDIT

I just remembered that statically linked libraries increase the memory usage.


In my opinion, if your binaries don't use the new features of newer GLIBCXX version, then they won't be linked with that version. So your binaries was linked with GLBCXX 3.4.9, there must be at least one symbol exported from it, and there're no any symbols exported from version newer than 3.4.9.