Subject Writing UDF for Linux
Author Milan Babuskov
I'm trying to learn how to write UDF funcions for Linux, but fail at
first steps. I read this document on ibphoenix:

And followed the instructions from the example. Compiling the file
went ok:

gcc -c -O -fpic -fwritable-strings modulo.c
ld -G modulo.o -lm -lc -o
cp /opt/interbase/UDF

I run RH7, and the Firebird is installed in /opt/interbase, which has
UDF directory with all letters uppercase, so I copied the .so file
there. (Later I thought this may be the problem, and I copied the .so
file to lib also, and also created udf directory (lowercase) and made
one copy there also)

Then I declared the udf with the query from article:

declare external function f_Modulo
integer, integer
integer by value
entry_point 'modulo' module_name 'modulo';


So far, so good. But when I try:

select f_Modulo(3, 2) from rdb$database;

I get:

Invalid request BLR at offset 60
function F_MODULO is not defined
module name or entry point could not be found

I also tried renaming file to modulo (without extension), but it
didn't work. What am I doing wrong here? Is there a way to check where
the database looks for .so file?