Subject Re: [firebird-support] UDF for linux 64 bit compiled with Freepascal 2.6.4
Author Roland Turcan
Re: [firebird-support] UDF for linux 64 bit compiled with Freepascal 2.6.4 Hello all,

I gonna answer to mayself, maybe it helps to someone.

The problem was missing uses in main unit:

    {$IFDEF UNIX}
    cthreads, // must be included before anything else for multithreaded apps, hell knows why
    {$ENDIF}
 
Greetings, RT;

<<< 15.12.2014 23:37 - Roland Turcan
konf@... [firebird-support] "firebird-support@yahoogroups.com" >>>

 
Hello firebird-support@yahoogroups.com!

I am migrating my UDF from windows to linux, but all functions using
string as output when they are used crashes the server.
I suppose it must be related to libib_util.so and its function
ib_util_malloc.

My declaration is the following:

{$IFDEF WINDOWS}
function ib_util_malloc(l: integer): pointer; cdecl; external 'ib_util.dll';
{$ELSE}
function ib_util_malloc(l: integer): pointer; cdecl; external 'libib_util.so';
{$ENDIF}

the same code was built in he past over Freepascal windows and it is
in production without errors.

Is there anything I need to do different for linux?

PS: A piece of pascal code with string function would help.

Thanks in advance.

--
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk






--
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk