[fpc-pascal]UDF + FreePascal + Firebird 1.5

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sun Jul 25 00:12:15 CEST 2004


On Sat, 24 Jul 2004, Guto wrote:

> > - I am confused about the changing of owner and permissions. Have you tried
> >  changing it to root, with permissions 755 ?
> 
> I copied the permissions from other firebird standard libraries...
>  
> Whell, Im do this now (and the error remains):
> 
> contents of teste.pas:
> 
> {$mode objfpc}
> 
> library teste;
> 
> function intmax(a,b: Integer): Integer; cdecl; export;
> begin
>   if a>b then intmax:=a else intmax:=b;
> end;
> 
> exports
>   intmax;
> 
> end.
> 
> -----
> 
> # fpc teste.pas
> # mv libteste.so teste.so
> # mv teste.so /usr/local/firebird/UDF/
> 
> (I not change the permissions this time)
> # ls -l teste.so
> -rwxr-xr-x  1 root  wheel  223551 24 Jul 13:56 teste.so*
> 
> in the IBExpert:
> 
> DECLARE EXTERNAL FUNCTION INTMAX
>     INTEGER,
>     INTEGER
> RETURNS INTEGER BY VALUE
> ENTRY_POINT 'intmax' MODULE_NAME 'teste';
> 
> select intmax(3, 2) from rdb$database;

Very strange. I tried it here, and it works fine for me. I have Firebird 1.5
installed, so....

What version of FPC did you use ?

Michael.




More information about the fpc-pascal mailing list