Mixing static libraries and shared libraries
问题 I have a project where I have one static library libhelper.a and another with my actual shared object library, libtestlib.so . My goal is to link libhelper.a into libtestlib.so . Is that possible on Linux/BSD? When I tried and created a test program I got the following errors: ./prog1:/usr/local/lib/libtestlib.so.1.0: undefined symbol '' My guess is that this is occurring because libhelper.a was not compiled with -fPIC while libtestlib.so was. What is the proper way to build programs that use