Subject 64 bit UDF DLL problem on Windows
Author Nagy Szilveszter
Hi all,

I hope someone can help me because I'm running out of ideas.

I have an UDF collection written in C language. It works fine on the Linux server (Firebird version is: firebird-superclassic-2.5.6.27020.0-1.el7.x86_64)
I just simply compiled it with gcc, copied the output .so file to Firebird's UDF folder and it just works.

Now i want to use this UDF on my Windows development laptop as well, so testing would be faster. Firebird installed on my laptop is: 2.5.7.27050, the 64 bit version

I took the same C file, compiled it with MinGW 64 bit compiler, copied the output to Firebird's UDF folder, declared in the database like:

DECLARE EXTERNAL FUNCTION addnumbers
    INTEGER,
    INTEGER
RETURNS INTEGER BY VALUE
ENTRY_POINT 'sum' MODULE_NAME 'sampledll';


Then i run this select:

SELECT addnumbers(5, 7) FROM rdb$database


I get this error msg: 

can't format message 13:896 -- message file C:\Windows\firebird.msg not found.
invalid request BLR at offset 36.
function ADDNUMBERS is not defined.
module name or entrypoint could not be found.


I also restarted Firebird, but still no success.

Do you have ideas why it cannot find my UDFs?
How could i find more detailed information? (Like it doesn't find the file? Or there is a problem finding the function in the file? Or are there compatibility issues? Or anything else?)


Thank you,
Szilveszter