Subject | UDF Problems |
---|---|
Author | Dan Taylor |
Post date | 2006-02-07T12:34:37Z |
Hi,
I'm trying to get a simple UDF library working on a Linux based
Firebird 1.5 server. I keep getting the error: "module name or
entrypoint could not be found" when I attempt to call my simple test
function.
I'm using *very* simple test code to get the hang of things. Looks like this:
//=============
int jtlMax(int *, int *);
int jtlMax(int *a, int *b)
{
if(*a < *b)
return *a;
else
return *b;
}
//=============
To compile I do the following...
#=============
gcc -c -O -fpic -fwritable-strings jtludf.c
ld -G jtludf.o -lm -lc -o jtludf.so
cp jtludf.so /opt/firebird/UDF/
#=============
Then I declare the UDF in the database using the following SQL...
//=============
declare external function JtlMax
integer, integer
returns integer by value
entry_point 'jtlMax' module_name 'jtludf'
//=============
But when I try to call the function (as per below) I get an error message...
//=============
select JtlMax(1, 2) from rdb$database
//=============
ISC ERROR MESSAGE:
invalid request BLR at offset 60
function JTLMAX is not defined
module name or entrypoint could not be found
Can anyone point me in the right direction?
Cheers,
Dan
--
Dan Taylor
Software Development Engineer, JTL Systems Ltd
PhD Student, Reading University, UK
http://www.logicalgenetics.com
I'm trying to get a simple UDF library working on a Linux based
Firebird 1.5 server. I keep getting the error: "module name or
entrypoint could not be found" when I attempt to call my simple test
function.
I'm using *very* simple test code to get the hang of things. Looks like this:
//=============
int jtlMax(int *, int *);
int jtlMax(int *a, int *b)
{
if(*a < *b)
return *a;
else
return *b;
}
//=============
To compile I do the following...
#=============
gcc -c -O -fpic -fwritable-strings jtludf.c
ld -G jtludf.o -lm -lc -o jtludf.so
cp jtludf.so /opt/firebird/UDF/
#=============
Then I declare the UDF in the database using the following SQL...
//=============
declare external function JtlMax
integer, integer
returns integer by value
entry_point 'jtlMax' module_name 'jtludf'
//=============
But when I try to call the function (as per below) I get an error message...
//=============
select JtlMax(1, 2) from rdb$database
//=============
ISC ERROR MESSAGE:
invalid request BLR at offset 60
function JTLMAX is not defined
module name or entrypoint could not be found
Can anyone point me in the right direction?
Cheers,
Dan
--
Dan Taylor
Software Development Engineer, JTL Systems Ltd
PhD Student, Reading University, UK
http://www.logicalgenetics.com