Linux: How to statically link against system libs?

Spacen Jasset spacenjasset at yahoo.co.uk
Sun May 8 15:43:19 PDT 2011


On 08/05/2011 20:42, Nick Sabalausky wrote:
> "Spacen Jasset"<spacenjasset at yahoo.co.uk>  wrote in message
> news:iq69q1$1ack$1 at digitalmars.com...
>>
>> It should work,but again is depends what your target platform is. It's
>> quite important that - Even on windows. At the company I am now
>> contracting for we compile the software agents using visual studio 2003
>> because later versions do not let the agent work with windows 98. This is
>> not just a Linux phenomenon.
>>
>
> But at least you can still compile *on* XP+ and get the result to work on
> 98. And fairly easily (ie: Just use VS 2003). That sort of thing *might* be
> true on Linux as well, but it seems to be either difficult or really
> obscure. For instance, no one here seems to know:
>
> http://ubuntuforums.org/showthread.php?t=1740277
>
> Plus, there's the fact that Linux has not just different versions, but many
> different distros, too. And the distros apperently tend to be somewhat
> divergent in different things.
>
> (But again, it's not like I'm saying "Windows kicks Linux's ass" or anything
> like that.)
>
>> In any case centos 4.7 is a point release of 4.0 and as such there should
>> be no breaking libc changes.
>>
>
> Ah! Thanks, that's good to know. In fact, I was specifically wondering about
> that, but I wasn't certain and didn't want to assume.
>
>
>
Yes, what you say it true. The most important thing usually is the glibc 
version. In terms of distributions, yes they all have different 
libraries installed, which can be a pain. For expat, we do infact 
statically link that, and boost, and zlib. - but you can ship dlls 
instead in that case, again of course, using some voodoo magic, RPATH 
linker setting.

It was the case back in the day, that to install something on unix 
systems, you would compile it, and in fact, sys admins would not install 
binaries...

If you get stuck again, or need assistance, then you can look me up on 
linkedin, facebook and send me a message. "Jason Spashett"


More information about the Digitalmars-d-learn mailing list