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

Coco Pascal coco.pascal at xs4all.nl
Mon Jun 1 11:40:08 CEST 2009


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.



More information about the fpc-pascal mailing list