Coco Pascal schreef:
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.)
It looks as if the code isn't executed at all. Maybe Firebird requires PIC. Is PIC on the shortlist of features for linux i386? Bugtracker doesn't have an entry about this.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to