Linking archives (.a) into shared object (.so)
问题 I'm compiling some shared objects file into an archive.a : $ g++ -c -Iinclude/ -fPIC -O0 -o object1.o source1.cpp $ g++ -c -Iinclude/ -fPIC -O0 -o object2.o source2.cpp $ ar rvs archive.a object1.o object2.o r - object1.o r - object2.o So far so good. The resulting archive.a has a good size of some KB. A dump with nm shows that the corresponding object-files are contained within the files. Now I'm wanting to compile several of these archives into a shared object file. g++ -g -O0 -Iinclude/ -I