This is exactly it -- /usr/lib/libssl.so points to /lib/libssl.so.4. I ought to have realized that /lib is not one of the default library search directories -- /usr/lib is where the linker will look. Thanks for the hint! Steve Jaffe wrote: > > You're right, and this is what is strange -- there is no /lib/libssl.so. > Perhaps this means there *is* a libssl.so but in another one of the > standard directories (pointing to /lib/libssl.so.4), which would be very > perverse but seems possible. > > -----Original Message----- > From: Paul Smith [mailto:paul@xxxxxxxxxxxxxxxxx] > Sent: Thursday, April 28, 2011 1:22 PM > To: Steve Jaffe > Cc: gcc-help@xxxxxxxxxxx > Subject: Re: how does linker choose version of shared lib? > > On Thu, 2011-04-28 at 09:57 -0700, Steve Jaffe wrote: >> To be specific: I have two versions of libssl in /lib: libssl.so.4 and >> libssl.so.6. What happens is that the .so.4 version is always linked -- >> what determines this behavior? (and how could one therefore change it, ie >> specify which version to choose?) > > Typically there's a symbolic link on the system "libssl.so" (note no > version) which points to whichever major version you want to use as the > default. This "un-versioned" .so is what's used by the compile-time > linker to determine which .so to link. > > Look for libssl.so and see if it points to libssl.so.4 or libssl.so.6. > > > -- View this message in context: http://old.nabble.com/how-does-linker-choose-version-of-shared-lib--tp31498483p31498760.html Sent from the gcc - Help mailing list archive at Nabble.com.