Subject Re: [firebird-support] Write UDF for 3.0 - Linux 64bit vs Windows 32bit
Author Gabor Boros
2018. 04. 19. 13:23 keltezéssel, Dimitry Sibiryakov sd@...
[firebird-support] írta:
> 19.04.2018 13:16, Gabor Boros mlnglsts@... [firebird-support] wrote:
>> What I am doing wrong?
>
> Your function does not match its definition: "RETURNS PARAMETER 1" is not what you think.


Is

DECLARE EXTERNAL FUNCTION TEST_UDF RETURNS BIGINT BY VALUE ENTRY_POINT
'TEST_UDF' MODULE_NAME 'MY_UDF';

the correct syntax?


> Use nm to check that TEST_UDF is really exported (remember about case sensitivity) and
> library is really libMY_UDF.so (case sensitivity again).


I use the file without the lib prefix and result of "nm MY_UDF.so":

w __cxa_finalize@@GLIBC_2.2.5
U dladdr@@GLIBC_2.2.5
U dlclose@@GLIBC_2.2.5
U dlopen@@GLIBC_2.2.5
U dlsym@@GLIBC_2.2.5
U __errno_location@@GLIBC_2.2.5
w __gmon_start__
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
w _Jv_RegisterClasses
U sched_yield@@GLIBC_2.2.5
0000000000009930 T TEST_UDF


Gabor