[Top][All Lists]

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

Re: static part of a shared library

From: Bill Northcott
Subject: Re: static part of a shared library
Date: Sun, 16 Nov 2008 17:07:38 +1100

On 16/11/2008, at 4:02 AM, matej wrote:
So imagine this situation: You want to compile a (shared) library. And
you also have very good reasons for requiring that a part of the library
is build as a static library ONLY and that the rest depends on it.
So once more:
1. I want to build a static library "libfoo_unsharable" out of some
2. And I want to build a (shared) library "libfoo".
3. Finally, whenever I link with either static or shared version of
"libfoo", I want libtool to link with "libfoo_unsharable" automatically.

As others wrote you need a convenience library.

However, as the code you are compiling will be part of a shared library, you need to use appropriate compiler flags. -fPIC is defaulted on the Apple compilers but I don't know if you need -fno- common anymore.

Bill Northcott

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

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