Static Linking on Linux

Miscellaneous Forums/Linux Discussion/Static Linking on Linux

Oh, you can't static link to a shared object.

You'd need a static (.a) version of it.... which usually means getting the source and building the static version. The same with any other libs you need.

Of course, the whole thing about shared libraries, is that they are shared, so you don't need to have every app on Linux with its own copy of a library, statically linked in.


My BaH.libcurl (and libcurlssl) modules are an example of building it from source into a static library (in this case a custom version specifically for a module).