hat did you mean with Standard FPC ?
The Original FPC.EXE ?
I don't mean the compiler.
I mean that you change all the system files (RTL) which your program uses.
So also the loading of LoadLibrary etc.
If you change the MessageBox to a writeln, compile the dll and the test program with standard RTL from FPC, it works fine.
So the problem is in your own RTL you wrote !!
(probably somewhere around the loadlibrary or dynamically calling of it.)
This works fine in standard FPC.
{$mode delphi}
library test2;
procedure test; export;
begin
writeln('test');
end;
exports test;
end.
{$mode delphi}
program test1;
procedure zum; stdcall; external 'test2.dll' name 'test';
procedure test;
begin
writeln('hallo');
zum;
end;
begin
test;
end.
stdcall doesn't make a difference in FPC x64 I thought.