automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shared library from smaller pieces


From: Ralf Wildenhues
Subject: Re: shared library from smaller pieces
Date: Wed, 7 Dec 2005 09:15:20 +0100
User-agent: Mutt/1.5.11

Hi Vlad,

* Vlad Skvortsov wrote on Wed, Dec 07, 2005 at 06:02:21AM CET:
> 
> And another question: I have a third-party library that I link my 
> project against. That one is declared (by its author) to be shared. 
> However, when I build that, I always end up with all both shared 
> (.so/.dylib) and static (.a) versions of the library.
> 
> So, when I link my project (all static), the static library is used.

OK.

> But recently, when I've built the shared library inside my project, it 
> referenced the third-party shared library, instead of including its 
> contents.

Well, isn't that what you want?

Look: If somebody happens to link against both your library and the one
whose code you'd like to also end up in your library, you'll have
duplicate symbols[1].  So in general, this is not a good idea.

> Of course, if that third-party library was mine, I would just change it 
> from lib_LTLIBRARIES to noinst_LIBRARIES; but that's not the case. What 
> is the proper way to do that?

I simply don't understand why you'd want that in the first place.

> What's the difference between noinst_LTLIBRARIES and lib_LIBRARIES?
> 
> Probably, I'm just confusing shared/static and installed/non-installed 
> library. I would be happy if you point me to the documentation that 
> could educate me.

Hmm, reading the neighboring chapters around the pointers I already gave
you may help.  But you may have done that already.

Cheers,
Ralf

[1] At least on some systems, you will have some sort of nasty trouble.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]