How to support dynamic plugins when statically linking in standard libraries?
问题 Suppose an application myapp.exe is built using g++ and it uses the flag -static-libstdc++ so that it can be installed in enviroments without libstdc++.so . myapp.exe also adds plugin support for some function plugf that can be dynamically loading via dlopen from a shard library. If libplug.so is such a plugin library that also links to libstdc++ , how can it do so in a way to be able to work with myapp.exe ? This is straightforward if libstdc++ is linked in dynamically since both myapp.exe