[CLN-list] future GCC 4.3 and modules.h

Richard B. Kreckel kreckel at ginac.de
Thu Jan 3 11:23:48 CET 2008


Hi Ralf,

Ralf Wildenhues wrote:
> Hmm.  I don't know how to fix this well: module.h gets installed and
> used by third-party software (users of CLN).  It needs to provide
> different settings for whether the user will later use the static or the
> shared version of libcln.  This is ugly, because it's generally not
> known at compile time which library will be used.
> 
> Unless libcln limits itself to installing just one version of the
> library, I don't see how this can be solved without requiring that the
> user of libcln choose at compile time (by a suitable define) whether to
> use the static or shared library (which is a different question whether
> the user is currently building PIC or non-PIC code).

Correct. I haven't seen this problem when I originally suggested to 
introduced some #ifdef PIC in cln/modules.h.

I'm beginning to think that it should be possible to solve this in the 
old software engineering way: introduce another layer of indirection in 
order to present a unique name for shared and static library to the 
compiling application and only distinguish between PIC and non-PIC 
inside the library proper. I'll give it a try and report on it later 
this day.

Cheers
   -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the CLN-list mailing list