linking static archive to another static archive

linking static archive to another static archive

Post by fatha.. » Fri, 17 Nov 2000 04:00:00



Hi,

Is linking a static library to another static library possible?

I have a static library, bar.a.  I have another library foo.a that uses
some of the functions in bar.a

Could someone show me how I can link foo.a to bar.a?

On Solaris, I get "embedded archive not possible".  I think under AIX,
linking an archive to another archive is possible.  Is this a
platform-dependent behavior?

In the FAQ, it talks about exploding both static archives into another
directory and then recombining them.  Is this the problem I'm
encountering?  What if I'm unable to do this?

Thanks for any help,

K.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

linking static archive to another static archive

Post by Nate Eldredg » Fri, 17 Nov 2000 04:00:00



> Hi,

> Is linking a static library to another static library possible?

> I have a static library, bar.a.  I have another library foo.a that uses
> some of the functions in bar.a

> Could someone show me how I can link foo.a to bar.a?

> On Solaris, I get "embedded archive not possible".  I think under AIX,
> linking an archive to another archive is possible.  Is this a
> platform-dependent behavior?

> In the FAQ, it talks about exploding both static archives into another
> directory and then recombining them.  Is this the problem I'm
> encountering?  What if I'm unable to do this?

Sounds like it to me.  Why should you be unable to do this?  Have you
tried it, and if so, what happened?

--

Nate Eldredge


 
 
 

1. linking (mixing shared libs and static archives)

can I mix shared libs and static archives when I link a program, or
must all the symbols in the shared objects be defined in shared objects.

I am currently splitting up a huge static archive into smaller shared
objects, and when I try to link the program, I have placed the static
archive at the end to 'define all undefined symbols'. When I did this
someone tried to execute one of the linked files, but it dumped core
before it reached main. When I inserterted -Bstatic and linked the
whole application static, everything worked fine. Could someone
please tell me if I can have unresolved symbols in a shared lib that
will be filled in by the static archive.

Trond Norbye

2. Problem with using extended filename globbing in Ksh

3. C++ linking problem creating a static lib from another static lib.

4. Need advice on partitioning

5. Problems linking static library on executable and static library

6. Loading a module multtiple times

7. ld with archive (static) bringing in unnecessary .o files

8. Complete sytem image

9. building shared library from static archive

10. shmem works static-linked, but not dynamic-linked

11. dynamic linking -> static linking == some _smaller_ executables

12. Is there any static ARP concept for static IP network?

13. Utility To Determine Static Libs In An Application (ldd for static libs)