Anthony Walter <sys...@gmail.com> 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

Reply via email to