You are not logged in.
Login or Register

Tip: Convert a static library (.a) to a shared object (.so)

Posted By: apeiro

A quick recipe on how to convert a static library (archive) to a dynamic one (shared object) in Linux.

.a files are just archives of .o object files, so all you need to do is unpack the archive and repackage them as a shared object (.so).

ar -x mylib.a
gcc -shared *.o -o mylib.so