From owner-freebsd-database@FreeBSD.ORG Wed Jul 28 19:18:48 2004 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8996F16A4CE for ; Wed, 28 Jul 2004 19:18:48 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CBFD43D69 for ; Wed, 28 Jul 2004 19:18:48 +0000 (GMT) (envelope-from gutojm@gmail.com) Received: by mproxy.gmail.com with SMTP id 75so144816rnl for ; Wed, 28 Jul 2004 12:18:46 -0700 (PDT) Received: by 10.38.81.69 with SMTP id e69mr34192rnb; Wed, 28 Jul 2004 12:18:46 -0700 (PDT) Message-ID: Date: Wed, 28 Jul 2004 16:18:46 -0300 From: Guto To: freebsd-database@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: UDF + Firebird + FreePascal + FreeBSD X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 19:18:48 -0000 I created a UDF, just to test and try to discovery what's wrong. I ill explain what I did step by step. I created a teste.pas file like this: ---- library teste; function intmax(a,b: Integer): Integer; stdcall; export; begin if a>b then intmax:=a else intmax:=b; end; exports intmax; end. ---- I compile with freepascal: fpc teste I moved to udf directory on firebird: mv libteste.so /usr/local/firebird/UDF/ I changed permissions: cd /usr/local/firebird/UDF chown firebird:firebird libteste.so chmod 550 libteste.so I declared UDF: DECLARE EXTERNAL FUNCTION INTMAX INTEGER, INTEGER RETURNS INTEGER BY VALUE ENTRY_POINT 'intmax' MODULE_NAME 'teste'; I test it: select intmax(1,2) from rdb$database; And I got this error message: Invalid token. invalid request BLR at offset 60. function INTMAX is not defined. module name or entrypoint could not be found. Does anyone have any ideas? Thanks in advance, -- Guto www.galle.com.br