Subject Re: [firebird-support] UDF for Linux with Free Pascal
Author Ivan Prenosil
> This doesn't bring an error, but brings nonsense results.

> function test (i : integer): integer; cdecl; export;
> begin
> Result := i;
> end;
> declare external function
> test integer returns integer by value
> entry_point 'test' module_name 'testudf';
> select test (1)
> from rdb$database
> brings 1072126920

Input parameters are always passed by reference, so your result is expected. Try this

function test (var i : integer): integer; cdecl; export;

> Does anybody use Free Pascal to create udf LIBRARIES FOR Linux and got them to work?
> Is there any documentation for that?

As Carlos already said, FP still can't create shared libraries on Linux :(
(actually, you can compile them, but the resulting code is unstable)