On Tue, 2008-03-18 at 13:43 -0700, muni2773 wrote:
> Folks I am trying to embed a static lib in a new lib that I am
> creating with more objects

> ar rcs libnew.a a.o b.o oldlib.a

> This succeeds but when I link against this new library the symbols
> from the old lib are missing

> Any ideas ?

Note this is not really a problem with GNU make.  You'll probably have
better support on a list more targeted at compilers or binutils.

However, on most systems ar cannot take an already-existing archive as
one of the "objects", and extract all its objects and install them into
a new archive.  That's simply a supported functionality: you can't do
it.


In your case the solution is actually pretty simple: just copy the old
library to the new library, then use ar to add in the new objects:

        cp oldlib.a libnew.a && ar rs libnew.a a.o b.o

-- 
-----------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>                 http://make.mad-scientist.us
 "Please remain calm--I may be mad, but I am a professional."--Mad Scientist




_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to