[fpc-pascal] Can someone please explain the linker to me?
jonas.maebe at elis.ugent.be
Wed Jun 5 22:37:59 CEST 2013
On 05 Jun 2013, at 21:58, Anthony Walter wrote:
> I am linking to openssl which I assume is already provided on most if not
> all distros. On 12.04 32 bit I was using "external 'libssl.so'" at the end
> of all my function imports which worked fine.
> On 13.04 this broke and I found there was no libssl.so in /usr/lib but
> there was a libssl.so.1.0.0 in /lib/x86_64-linux-gnu/libssl.so.1.0.0. I
> then created a symbolic link to that shared object in my /usr/lib folder
> named libssl.so and everything worked, or so I thought.
That is the wrong approach. Delete the .so symlink again, and instead install the libssl-dev package (or similar).
The linker will only look for lib<name>.so, but it will resolve that link to its target in case it's a symlink, so that the symlink is no longer required at run time. It will not look for lib<name>.so.<something>, that one is only used by the programs at run time (since the symlinks at compile/link time pointed to it and the linker will write the name of this symlink target into the binary's list of linked libraries).
More information about the fpc-pascal