At least on Linux and Solaris, static libraries are really just a bunch of compiled .o\'s tossed into one big file. When compiling a static library, usually the -fpic flag i
I do the following in the link stage for the shared object library version of a static library: g++ -shared -o libshared.so -Wl,--whole-archive -fPIC -lstatic -Wl,--no-whole-archive. Since --whole-archive links every object in a (list of) static libs (of the form libstatic.a) I believe preceding that (list) with -fPIC is all the OP need do.