[Top][All Lists]

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

Re: shared library from smaller pieces

From: Vlad Skvortsov
Subject: Re: shared library from smaller pieces
Date: Tue, 20 Dec 2005 17:10:40 -0800
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6a) Gecko/20031207

Ok, thanks a lot for your explanations. That helped me to clarify my own understanding! :-)

Ralf Wildenhues wrote:

Hi Vlad,

* Vlad Skvortsov wrote on Thu, Dec 15, 2005 at 11:59:46PM CET:
Ralf Wildenhues wrote:
* Vlad Skvortsov wrote on Fri, Dec 09, 2005 at 11:46:46PM CET:

Ok, I believe I have to explain more here. My product is deemed to be self-contained: no dependencies on external shared libraries, nothing. I build all my [C] applications static. However, recently a need has arised to write a Perl script and include it into the distribution. This script needs some functionality from my core libraries. So I have to build a shared module that my Perl script will load and use. I guarantee that noone else will link against this shared module; if someone will, it's not my problems, since I didn't intend to.

My application uses third-party library that is [deemed by its author to be] built as shared. However, I want all my applications to link statically against it and I want my shared module to include its contents (so that the end user doesn't have to install this third-party shared library).

Yes. The answer is: I don't think this is possible.
*snipped my misunderstanding*

Well, yes, I understand that it's not possible if all we have is just a shared library binary. But my case is when I have _sources_ of the libtool-controlled library, not in my tree though. So, I have both .a and .so/.dylib for that. The one thing that is missing here is the ability to make autotools use the right file.

D'oh.  Sorry, I think you explained that well enough but I just didn't
understand it in the right way.

Well, there's a current libtool limitation in that it can't link some
libs statically and some shared.  1.5.22 will fix the `-static' in the
way that only uninstalled libtool libraries will be linked statically
(so if you use no other ones, using that will help you).  You can always
use `-all-static' to get a static executable.  Per-library switches are
still on our TODO list, sorry.


Vlad Skvortsov, address@hidden, address@hidden

reply via email to

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