Chris Baus

Statically linking libstdc++ take two

Johan Petersson, who has provided valuable C++ knowledge in the past, has a follow up entry to my libstdc++ post. Johan recommends moving creating a symbolic link to the static libstdc++.a library in another directory, and explicitly adding that directory to the linker's path with -L. How he figured that out, I'll never know.

The point about dynamically loading other shared libraries that depend on other version of libstdc++ is taken. With that said, it isn't a problem for me, because I intend to build and statically link all my dependencies, so all the libraries will will all be using the same libstdc++. I stick behind my decision to statically link the executable. BTW, the only thirdparty c++ library that I am using is libxml2, and that is only for parsing the configuration file. (libxml2 is a C library)