Am Mittwoch, den 12.11.2008, 22:55 +0200 schrieb KES:
> Здравствуйте, Marc.
> 
> Вы писали 12 ноября 2008 г., 22:13:32:
> 
> MS> Another observation:
> 
> MS> In any case you get the error message:
> 
> >> function FNTEST2 is not defined
> >> module name or entrypoint could not be found
> 
> MS> If the function name is there and written correctly, make sure the
> MS> module (= your library) is found. I'm not used to making UDFs, but
> MS> somehow the search path and maybe the libraries found there can be
> MS> listed similar to using "ldconfig -r" but for the firebird stuff.
> 
> MS> Marc
> 
> "C" programm 'testudf.c' I have compiled with gcc works fine. Firebird see it 
> and
> I can call 'fntest' function
> 
> When I compile my 'tkes.pp'. Firebird do not found function I need.
> 
> In both cases (C, FPC) libs are located in
> /usr/local/libexec/firebird/udf directory and have same premissions
> 
> also I have tryed to test my libtkes2.so.
> 
> I write test.pp
> {$linklib libtkes2.so}
> 
> function somefn(): integer; stdcall; external 'libtkes2' name 'somefn';

Will stdcall default to cdecl?

> begin
>   Writeln( somefn() );
> end.
> 
> in this case dynamic library are located and somefn is called
> 
> This seems that Firebird does not understand .so module compiled by
> FPC
> 
> also I have tryed this:
> fpc -Cn tkes2.pp
> gcc tkes2.o -o libtkes2.so -shared
> in this case Firebird also does not see somefn:
> DETAILS:
> libtkes2.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), 
> dynamically linked, not stripped

Then I'd say the fault is clearly on the firebird side.

One last thing I'd try is to use another name (like with ld: using
-lmine is searching for "libmine.so", not only "mine.so"), if that
fails, too, it time for one of fpc's developers to comment or the
firebird people to investigate.

Marc


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to