[fpc-pascal] Firebird +lin32 + fpc lib udf returns garbage.

Coco Pascal coco.pascal at xs4all.nl
Sun May 31 15:31:32 CEST 2009


If I build a library with udf functions for Firebird tests with an fpc 
app calling those routines works fine. However with Firebird module and 
entrypoint are found but garbage is returned.

function vv(const AValue: LongInt): LongInt; cdecl; export;
begin
  Result := AValue;
end;

declare external function vv
integer
returns integer by value
entry_point 'vv' module_name 'libyfbudf';

select vv(13) from rdb$database;
returns -12350740

All variations of the input parameter return the same result.
 
What can I do? Has anybody succesfully created a Firebird udf library on 
lin32?

(The same module build with fpc win32 works fine with Firebird win32.)




More information about the fpc-pascal mailing list