X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 33E57475EFD; Mon, 21 Apr 2003 23:53:47 -0400 (EDT) Received: from cpc-gw2.cpc.net.au (unknown [210.9.248.93]) by postgresql.org (Postfix) with ESMTP id 8A118474E42; Mon, 21 Apr 2003 23:53:45 -0400 (EDT) Received: from utiba.com (IDENT:root@ser1.cpc.net.au [192.168.0.19]) by Utiba Mail Gateway (2.2.2) with ESMTP id h3M2mjP30174; Tue, 22 Apr 2003 12:48:45 +1000 Received: from Utiba Mail Thingy by utiba.com (Dunno/1.1.2) with ESMTP id NAA16684; Tue, 22 Apr 2003 13:53:48 +1000 From: Philip Yarra Organization: Utiba To: Michael Meskes Subject: Re: ECPG CVS version problems Date: Tue, 22 Apr 2003 13:45:40 +1000 User-Agent: KMail/1.4.1 Cc: pgsql-interfaces@postgresql.org References: <200303280200.h2S20N218363@candle.pha.pa.us> <200303311023.04279.philip@utiba.com> <20030410172004.GB6995@feivel.fam-meskes.de> In-Reply-To: <20030410172004.GB6995@feivel.fam-meskes.de> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_4S7Q5YSFK1A28XT22I6D" Message-Id: <200304221345.40455.philip@utiba.com> X-Spam-Status: No, hits=-38.9 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_KMAIL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/145 X-Sequence-Number: 4084 --------------Boundary-00=_4S7Q5YSFK1A28XT22I6D Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Fri, 11 Apr 2003 03:20, Michael Meskes wrote: > Can you take ecpg from CVS? I will not be able to answer email for about > a two week long vacation trip, but everything I've done so far is in > CVS. Hi Michael, I grabbed everything from CVS and tried building, but ran into = a=20 few problems. Bison 1.35 and 1.50 both have bugs that prevent successful compilation, so = I=20 moved to 1.85. This appears to work okay. Is there some way during configur= e=20 to check for broken bison versions and complain loudly? Once I compiled the source tree, and got it installed, I ran into further= =20 problems as soon as I tried to link against the ecpg libs: $ gcc -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg test.c /usr/local/pgsql/lib/libecpg.so: undefined reference to=20 `PGTYPESnumeric_from_asc' /usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESdate_to_asc' /usr/local/pgsql/lib/libecpg.so: undefined reference to=20 `PGTYPESinterval_from_asc' /usr/local/pgsql/lib/libecpg.so: undefined reference to=20 `PGTYPESinterval_to_asc' /usr/local/pgsql/lib/libecpg.so: undefined reference to=20 `PGTYPEStimestamp_from_asc' /usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESdate_from_a= sc' /usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESnumeric_cop= y' /usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESinterval_co= py' /usr/local/pgsql/lib/libecpg.so: undefined reference to=20 `PGTYPEStimestamp_to_asc' /usr/local/pgsql/lib/libecpg.so: undefined reference to=20 `PGTYPESnumeric_to_asc' collect2: ld returned 1 exit status Is there something obvious I am doing wrong here? Is there something borked= in=20 my build environment? I've attached my test.pgc. Regards, Philip Yarra. --------------Boundary-00=_4S7Q5YSFK1A28XT22I6D Content-Type: text/x-csrc; charset="iso-8859-1"; name="test.pgc" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test.pgc" #include int main(int argc, char *argv[]) { EXEC SQL BEGIN DECLARE SECTION; char *target = "bob@snode5"; char *user = "philip"; char *message = "It came from embedded C - again!"; char *pquery = "INSERT INTO test (message) VALUES(?)"; EXEC SQL END DECLARE SECTION; if(argv[1] != NULL) message = argv[1]; EXEC SQL WHENEVER sqlerror sqlprint; EXEC SQL CONNECT TO :target USER :user; /*EXEC SQL SET AUTOCOMMIT TO ON; */ EXEC SQL PREPARE stmt_id FROM :pquery; EXEC SQL EXECUTE stmt_id USING :message; EXEC SQL COMMIT; EXEC SQL FREE stmt_id; EXEC SQL DISCONNECT ALL; } --------------Boundary-00=_4S7Q5YSFK1A28XT22I6D--