[fpc-pascal]UDF + FreePascal + Firebird 1.5
Guto
gutojm at gmail.com
Sat Jul 24 19:10:40 CEST 2004
> - 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;
and the error:
Invalid token.
invalid request BLR at offset 60.
function INTMAX is not defined.
module name or entrypoint could not be found.
More information about the fpc-pascal
mailing list