Michael Van Canneyt
michael at freepascal.org
Sat Nov 15 01:52:48 CET 2008
On Sat, 15 Nov 2008, KES wrote:
> Здравствуйте, Michael.
> >> 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;
> somefn:= 3;
> somefn name '_somefn';
> 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 ?
More information about the fpc-pascal