Subject UDF for Linux with Free Pascal
Author kittikira
I have a lot of UDFs created with Delphi for Windows platform.
Now, I just wanted to transfer my UDFs to Linux plattform using Free Pascal, but it doesn't work as expected.

First problem is, that my main library allways brings Firebird to disconnect, when using an UDF of this library.
So I started a small testlibrary, with just one UDF.
This doesn't bring an error, but brings nonsense results.

I just pass an integer value to it and return the same value back.

function test (i : integer): integer; cdecl; export;
Result := i;

declare external function
test integer returns integer by value
entry_point 'test' module_name 'testudf';

select test (1)
from rdb$database

brings 1072126920

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

Please help.