[fpc-devel] linking with SDL libs fails.

Peter Vreman peter at freepascal.org
Wed Apr 6 08:58:38 CEST 2005


> Hello all,
> I submited now a bug report and would to do it also here.
>
> Compiler incorectly forms import names from single-char constants. In the
> sample below, then compiler adds to a function name not only 'A' but also
> an additional mistake symbol, at result the function cannot be found in
> the dll.
>
> const
>   A = 'A';
> function MessageBox(p1: longint; p2, p3: pChar; p4: longint): longint;
> stdcall;
>   external 'user32.dll' name 'MessageBox' + A;
> begin
>   MessageBox(0, 'Hello!', 'Hello!', 0);
> end.

Patch is already finished, but not yet commited







More information about the fpc-devel mailing list