Received: from redbox.venux.net (redbox.venux.net [216.47.238.10]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA22155 for ; Tue, 25 May 1999 23:54:36 -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 82CE02E20B; Tue, 25 May 1999 23:53:18 -0400 (EDT) Message-Id: <4.1.19990525234214.00a67910@mail.venux.net> X-Sender: mhagerty@mail.venux.net X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Tue, 25 May 1999 23:54:58 -0400 To: pgsql-interfaces@postgreSQL.org From: Matthew Hagerty Subject: Shared lib grief with 6.4.2 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Greetings, I'm trying to create a simple function for postgres-6.4.2 under FreeBSD-3.1-RELEASE and GCC-2.7.2.1. This is the program code, simply converts a bool to int4: #include "../include/postgres.h" int4 bool2int(bool bCondition) { if (bCondition) return(1); else return(0); } Then on the command line to create the shared lib and a file command to ensure I created a shared lib: # gcc -shared -I../include -o procs.so bool2int.c # file procs.so procs.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), not stripped Then in psql: => create function bool2int(bool) returns int4 as '/usr/local/pgsql/procs/procs.so' language 'c'; CREATE => select bool2int(1=1); ERROR: Can't find function bool2int in file /usr/local/pgsql/procs/procs.so => Any insight as to why this does not work would be greatly appreciated. Thank you, Matthew Hagerty