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 From owner-freebsd-database@FreeBSD.ORG Thu Jul 29 10:10:04 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 519EB16A4CE for ; Thu, 29 Jul 2004 10:10:04 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CEE43D64 for ; Thu, 29 Jul 2004 10:10:04 +0000 (GMT) (envelope-from gutojm@gmail.com) Received: by mproxy.gmail.com with SMTP id 75so1652rnl for ; Thu, 29 Jul 2004 03:10:03 -0700 (PDT) Received: by 10.38.9.78 with SMTP id 78mr12391rni; Thu, 29 Jul 2004 03:10:03 -0700 (PDT) Message-ID: Date: Thu, 29 Jul 2004 07:10:03 -0300 From: Guto To: firebird-support@yahoogroups.com, freebsd-database@freebsd.org, freepascal@yahoogrupos.com.br, fpc-pascal@lists.freepascal.org, fpc-pascal-request@lists.freepascal.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: Subject: Re: [firebird-support] Re: UDF + FreeBsd + FreePascal 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: Thu, 29 Jul 2004 10:10:04 -0000 I'm realizing this now... I think that's necessary notify FreePascal development team about that... My WebServer is FreeBSD and my FileServer is Windows NT... Im migrating Windows to FreeBSD too... To maintain the same OS in all servers... But, in face of that, I realize that Linux will be the solution... Thanks, Guto On Thu, 29 Jul 2004 06:29:32 -0000, szdfs2003 wrote: > I have such problem, I try do it about month, > but use C language - and no problems. > > FreePascal UDF`s - not working under FreeBSD, > under Linux - use Kylix - and all working! > > > Anyone uses FreePascal to compile UDFs to Firebird on FreeBSD? > > I still having problems with that... > > > > Its works or not? Or only in Linux? > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> > Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. > Now with Pop-Up Blocker. Get it for free! > http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/67folB/TM > --------------------------------------------------------------------~-> > > > Yahoo! Groups Links > > <*> To visit your group on the web, go to: > http://groups.yahoo.com/group/firebird-support/ > > <*> To unsubscribe from this group, send an email to: > firebird-support-unsubscribe@yahoogroups.com > > <*> Your use of Yahoo! Groups is subject to: > http://docs.yahoo.com/info/terms/ > > -- Guto