[fpc-pascal] Linux library access violation

Chris chris at venturexs.com
Mon Oct 30 15:11:40 CET 2006


 >L505 wrote:
 >First thing to check.... is it declared CDECL or STDCALL in the C library?
 >I think the default C declaration mode is CDECL if it is not defined 
explicitely.

I knew it was gonna be the obvious. I changed:
function testreturn(thename:pchar;rcity:pchar;rstate:pchar):integer; 
stdcall; external 'libTester';
to
function testreturn(thename:pchar;rcity:pchar;rstate:pchar):integer; 
cdecl; external 'libTester';

and all is good.

Thank you very much ;)




More information about the fpc-pascal mailing list