3 ms·
That may all be true, but I guess GP was asking what that has to do with statically linking your main binary (or not), which of course you can do, yet still use
by tannhaeuser 6y ago
That may all be true, but I guess GP was asking what that has to do with statically linking your main binary (or not), which of course you can do, yet still use shared libs as plugin loading mechanism. For example, ODBC drivers (with or without the various unixODBC/iODBC proxies) can be dlopen()ed from otherwise statically compiled main binaries just fine, can't they (even though for ODBC the typical use case is using a driver manager rather than invoking dlopen() directly)?
- pjmlp 6y agoSure, but that raises the question why bother with static linking if dlopen if being used anyway. With dlopen the application can crash in very interesting ways, if it doesn't handle loading the errors in a proper way. And there is no way to use something like dumpbin or ldd to actually find out what it is looking for, even something like strings might not help, because the path to the file being dynamically loaded in an explicit way might itself be dynamically constructed at runtime.