I am working on various flavors of Linux and I need to combine multiple static libraries such as
foo1.a
foo bar.a
foo2.a
into one single combo static library (note that the second file has a space in it's name).
I've seen stackoverflow articles that explain how to do this with an ar mri
script. The suggestion is to create a file named combine.ar
with contents such as
CREATE comboLib.a
ADDLIB foo1.a
ADDLIB foo bar.a
ADDLIB foo2.a
VERBOSE
SAVE
END
And then use the command ar -M < combine.ar
.
However, the ar script language treats spaces as a way to add two items, so it sees the second line as add library foo and library bar.a
I've tried the following with no luck
ADDLIB "foo bar.a"
ADDLIB foo\ bar.a
ADDLIB 'foo bar.a'
How can this be done?