>
>  What is actual definition of the UDF function?

DECLARE EXTERNAL FUNCTION SIMPLE
  CSTRING (254)
  RETURNS CSTRING (254) FREE_IT
  ENTRY_POINT 'Simple' MODULE_NAME 'SitaUdfLib.dll'


Ah, I remembered what is wrong with it. FPC by default uses bad
> single-threaded memory
> manager. You must add cmem and cthread units as the first to your project
> "uses" list.


I had already cthread in the units list as first (right after Classes unit)
, I added also cmem but it didn't help.

I did another test: I created an empty project and created a basic Simple2
function that returns nothing but an empty string and I don't get any
issue. Then I added to the same project, in uses section, the units of my
original UDF project and now I get the same error message from firebird
even when I call the basic function that returns the empty string that
worked before. So that means the compiler options are not cause of the
problem.



On Thu, Feb 27, 2020 at 11:01 AM Dimitry Sibiryakov <s...@ibphoenix.com>
wrote:

> 26.02.2020 16:34, Dimitry Sibiryakov wrote:
> > Something else must be wrong in his UDF (or FPC).
>
>    Ah, I remembered what is wrong with it. FPC by default uses bad
> single-threaded memory
> manager. You must add cmem and cthread units as the first to your project
> "uses" list.
>
>
> --
>    WBR, SD.
>
>
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to