Subject Re: [firebird-support] UDF for Linux with Free Pascal
Author Carlos H. Cantu
Last time I tried to make UDFs with FreePascal was about 3 years ago,
and it had problems because FPC (at last in that time) didn't support
generating PIC code in libraries. This leaded to server crashes,
specially when you are using superserver with several connections
calling the UDF at the same time.

I have no idea if the newest versions of FPC solved this problem. If
don't so, I guess your alternative will be to write the UDFs in C :-(

Firebird Performance in Detail - -

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

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

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

k> function test (i : integer): integer; cdecl; export;
k> begin
k> Result := i;
k> end;

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

k> select test (1)
k> from rdb$database

k> brings 1072126920

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

k> Please help.

k> ------------------------------------

k> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

k> Visit and click the Resources item
k> on the main (top) menu. Try Knowledgebase and FAQ links !

k> Also search the knowledgebases at

k> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
k> Yahoo! Groups Links