Received: from mail1.bctel.ca (lakecity-m69.bctel.ca [207.194.28.69]) by hub.org (8.9.1/8.9.1) with ESMTP id WAA19078 for ; Mon, 18 Jan 1999 22:19:39 -0500 (EST) (envelope-from gburnham@sfu.ca) Received: from lucie (a3a13627.sympatico.bconnected.net [209.53.8.141]) by mail1.bctel.ca with SMTP id TAA23116 for ; Mon, 18 Jan 1999 19:19:29 -0800 (PST) Message-ID: <00ff01be435a$52d71ea0$8d0835d1@bconnected.net> Reply-To: "Gregory W Burnham" From: "Gregory W Burnham" To: Subject: Re: [SQL] binary operators / C func getting "invalid ELF header" Date: Mon, 18 Jan 1999 19:18:01 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.0810.800 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 >> I've gone down the path of trying to write a C function to >> do this... and am getting this error: >> >> db=3D> select not_a_and__a_xor_b(1,1); >> ERROR: Load of file /home/michael/sql/funcs.so failed: >> =A8=B8t@=A8=B8t@chael/sql/funcs.so: invalid ELF header >> >> I'm compiling with the -fpic option for Linux (under gcc) >> >> cc -c -O2 -fpic -g -I. -I./include -I. -I./include -c funcs.c -o >> funcs.o >> /bin/rm -f funcs.so >> /usr/bin/ar cr funcs.so funcs.o =20 Here's an except from my make file, and I've had not problem (so far) with the functions. cc -c -I/usr/include/pgsql functions/functions.c -o functions/functions.o ld -shared -o /tmp/functions.so functions/functions.o Gregory W Burnham Software Engineer Excite Labs Faculty Of Education Simon Fraser University Vancouver, BC, V5A 1S6 604 291 3615 (ph) 604 291 5679 (fx)