[fpc-pascal] Defining sonames?

Martin Schreiber mse00000 at gmail.com
Thu Aug 17 17:52:37 CEST 2017


On Thursday 17 August 2017 17:31:46 Sven Barth via fpc-pascal wrote:
> Am 17.08.2017 15:49 schrieb "Graeme Geldenhuys" <
>
> mailinglists at geldenhuys.co.uk>:
> > On 2017-08-16 18:14, Sven Barth via fpc-pascal wrote:
> >> As you can see the program will work correctly as long as the
> >> libX11.so.6 file exists (even though that is a symlink itself, but the
> >> X11 project guarantees that different libX11.so.6.x.y are compatible to
> >> eachother), because the linker picks the SONAME that is set inside the
> >> binary. And the libX11.so.6 symlink is part of the non-devel package.
> >
> > Sven, now here is an interesting problem regarding the way FPC (or Object
>
> Pascal in general) works with C based libraries. Martin pointed this out in
> another mailing list, and he gave me permission to forward it here. What is
> your answer or recommendation to this problem?
>
> Write in your application's readme which versions it requires. It might be
> true that the devel packages contain the C-headers, but there might
> nevertheless be failures if the applications
> is programmed against the interface of the older v1 library (maybe they
> changed the memory management for v2 and the problem will only manifest at
> runtime).
>
Exactly. So why not use the SONAME in the Pascal binding unit instead to use 
the base name as Free Pascal currently does in xlib.pp for example?

Martin



More information about the fpc-pascal mailing list