Sunday, 28 August 2011

QuickBits-7: Convert .a file to .so file

.a files are just archive of .o object files. You need to just extract the files from the archive and package them as a shared object (.so).

ar -x myarchive.a


gcc -shared -Wl,-soname,mysharedlib.so *.o -o mysharedlib.so

No comments:

Post a Comment