[fpc-devel] linking with SDL libs fails.

Ozerski Pavel ozerski at list.ru
Wed Apr 6 08:23: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.


Pavel




More information about the fpc-devel mailing list