Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-16 Thread fredvs
>> https://bugs.freepascal.org/view.php?id=32367

> Maybe close out that bug then?

Or fix it (Martin gave all the keys how to do, even Florian agree with it) ?




-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-15 Thread Anthony Walter
Maybe close out that bug then?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread fredvs

https://bugs.freepascal.org/view.php?id=32367



-
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Sven Barth via fpc-pascal
Anthony Walter  schrieb am So., 12. Mai 2019, 20:42:

> Okay, so I need to install the dev versions of any package I want to link
> against. But when my program is distributed it will link at load time
> correctly to the non dev versions.
>

It links against the version the development version linked against. If the
user has a different version installed (even if they have the development
package installed) the application won't load of course.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Anthony Walter
Okay, so I need to install the dev versions of any package I want to link
against. But when my program is distributed it will link at load time
correctly to the non dev versions.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Sven Barth via fpc-pascal
Anthony Walter  schrieb am So., 12. Mai 2019, 18:41:

> For example suppose I want to write some pascal code linking to an
> external functions like so:
>
> const
>   libsdl2 = 'libSDL2-2.0.so.0';
>
> function SDL_Init(flags: Uint32): LongInt; cdecl; external libsdl2;
> procedure SDL_Quit; cdecl; external libsdl2;
>
> And when I try to compile the linking will likely failed because something
> is happening where the libsdl2 constant of 'libSDL2-2.0.so.0' is being
> converted to 'SDL2-2.0' at some point during the compilation or linking
> stage when working on Linux.
>

This is indeed how it is supposed to work. You are supposed to link against
the development library so that the linker can pick up the correct, real
library.

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal