Sadly, what's been most effective for me is to extract all the .o
s from the static library and then include them with your .o
s to make a single .a
So you could look at the contents of libxml2.a
with ar t libxml2.a
Let's say for simplicity that it only contained: xml2a.o
and xml2b.o
You want to combine those with your mine.o
to make mine.a
You'll need to first do ar x libxml2.a
to get out xml2a.o
and xml2b.o
Then do ar cr mine.a mine.o xml2a.o xml2b.o
A simple explanation of the most widely used ar
commands, though I've probably summarized what you'd get from it here.