[Top][All Lists]

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

Re: linking against shared libraries

From: Mike Frysinger
Subject: Re: linking against shared libraries
Date: Fri, 9 Dec 2011 11:34:32 -0500
User-agent: KMail/1.13.7 (Linux/3.1.0-atsc; KDE/4.6.5; x86_64; ; )

On Friday 09 December 2011 06:21:18 Rainer Gerhards wrote:
> I am trying to build a program so that it does not refer to shared
> libraries by their version-specific name but rather a generic one. My
> intent is to use checkinstall to generate packages.
> As a concrete example, I use some basic openssl functionality that is
> available in both newer and older versions of the library (without any
> ABI issues). In essence, it does not matter if 0.9.x or 1.0.x is used.
> However, after my program is built, the exact version number seems to
> be required. So if I build on an older system and move the binary over
> to the newer one, the new one complains that 0.9.x is not available
> (which is fine with me, because 1.0.x does nicely). And vice versa for
> the other direction.

it isn't possible to link against "" and have that be recorded.  you 
have to realize that the differences between them isn't simply naming ... they 
changed because the binary interfaces between the two versions changed.

the closest you could do is load the library with dlopen(), then use dlsym() 
to look up specific funcs, and then hope the specific functions you're using 
didn't actually change between versions.

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

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