I am trying to build an archive from a collection of object files. I am doing this with
ar -rs my_archive.a foo.o bar.o other_object_files.o.
ar -rs my_archive.a foo.o bar.o other_object_files.o
On
The problem is that apparently common symbols are not added by default.
Option 1:
ar -rs my_archive.a foo.o bar.o other_object_files.o ranlib -c my_archive.a
Option 2:
libtool -c -static -o my_archive.a foo.o bar.o other_object_files.o