Received: from redbox.venux.net (redbox.venux.net [216.47.238.10]) by hub.org (8.9.3/8.9.1) with ESMTP id CAA47528 for ; Tue, 20 Apr 1999 02:42:51 -0400 (EDT) (envelope-from matthew@venux.net) Received: from thunder (net177138.hcv.com [209.153.177.138]) by redbox.venux.net (Postfix) with SMTP for id AC60D2E22A; Tue, 20 Apr 1999 02:41:55 -0400 (EDT) Message-Id: <4.1.19990420023358.00b5c340@mail.venux.net> X-Sender: mhagerty@mail.venux.net X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Tue, 20 Apr 1999 02:41:36 -0400 To: pgsql-interfaces@postgreSQL.org From: Matthew Hagerty Subject: Compiling a function Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Greetings, I have a very simple function I am trying to get working with 6.2.4. I compiled the C program without any errors, but when I try to do a simple query to see if it worked I get this error: select bool2int(1 > 1); ERROR: Load of file /usr/local/pgsql/procs/bool2int.o failed: dlopen (/usr/local/pgsql/procs/bool2int.o) failed I am running on FreeBSD-3.1-RELEASE with GCC 2.7.2.1. The command I issued to compile was: gcc -fpic -I../include -c bool2int.c and the program is: #include "../include/postgres.h" int2 bool2int(bCondition) bool bCondition; { if (bCondition) return(1); else return(0); } I must say thank you to Jose Soares for providing me a solution, i.e. this function, however I cannot get it to work. Thanks, Matthew Hagerty