On Sat, 15 Nov 2008, KES wrote:
> Здравствуйте, Michael. Zdravstvuyte... > >> I have tryied my example to compile in Delphi. Then I use DLL in > >> FireBird on Win32. All works fine. So my source file is good > >> and therefore FreePascal can not compile shared library that can be > >> recognized by FireBird ((( > > MVC> Did you specify cdecl as the calling convention for non-windows ? > MVC> If it works on windows, it almost surely does not work straight out > MVC> of the box on unices, because the calling convention will be wrong. > > MVC> Michael. > > This is last my try: > > library MyUDF; > > > function somefn: integer; cdecl; export; > begin > somefn:= 3; > end; > > exports > somefn name '_somefn'; > end. > > On win32 it works, on FreeBSD does not I compiled the library, and checked the contents: home: >objdump -t libmyudf.so 00004a20 g F .text 00000005 _somefn So the symbol is present, as you declared it in your library. That part seems OK. How do you declare your function in Firebird ? Does it have the _ ? and the correct casing ? Michael.
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal