views:

3

answers:

0

I know how to convert a static library to a dynamic library:

gcc -shared -o sofile.so -lafile.a

Is there a way to do it the other way around, such as converting a dynamic library to a static library or to an object file?

Meaning: I have mydynamiclib.so and I want either it in one big object file myobjectfile.o or one big static library mystaticlib.a. If I can get an object file, I can run ar -r mystaticlib.a myobjectfile.o && ranlib mystaticlib.a