Received: from Mailserver-1.Adviser.com (root@Hefner.HH.Core.Adviser.com [194.221.31.26]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA08346 for ; Thu, 17 Feb 2000 12:30:43 -0500 (EST) (envelope-from guido@nathan.gold.siebend.net) Received: from nathan (nathan.gold.siebend.net [195.244.119.86]) by Mailserver-1.Adviser.com (8.8.8/HEFNER-abels-1.3) with ESMTP id SAA25672; Thu, 17 Feb 2000 18:30:15 +0100 Received: by nathan.gold.siebend.net via sendmail from stdin id (Debian Smail3.2.0.102) for chrish@owl.co.uk; Thu, 17 Feb 2000 18:31:55 +0100 (CET) To: Cc: "Chris Holman" Subject: Re: [INTERFACES] link problems when inheriting from libpq++ References: <000801bf7941$8f9a1c20$2d96a8c0@dylan.owl.co.uk> X-Alignment: chaotic From: Guido Goldstein In-Reply-To: "Chris Holman"'s message of "Thu, 17 Feb 2000 12:21:47 -0000" Date: 17 Feb 2000 18:31:55 +0100 Message-ID: Lines: 39 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Hi! On Thu, 17 Feb 2000 12:21:47 -0000 "Chris Holman" wrote: [...] > void main(void){ > /*********** why does next line cause problems during > link?*************/ > newPgCursor causesLinkErrors; > PgCursor cdh("dbname=testing", "cdh1"); [...] > CCC=g++ > > GCCOPTIONS= -frtti -D_CPPRTTI ^^^^^^^ Viewpoint 1 [...] > ******************** LINKER OUTPUT STARTS ************************** > [chrish@pigpen testString]$ make > g++ -frtti -D_CPPRTTI -D_UNIT_TEST_OBJECT_ -I/usr/include/pgsql/libpq -I/usr/i > nclude/pgsql/libpq++ -I/usr/include/pgsql -c test.cpp -o test.o > g++ -o test.exe test.o -L/usr/lib -lpq++ -lpq > test.o: In function `newPgCursor type_info function': > test.o(.gnu.linkonce.t.__tf11newPgCursor+0xd): undefined reference to `PgCursor > type_info function' Read the error message! You're compiling your program with RTTI (runtime-type-information) enabled (see Viepoint 1). Before you can use other C++-Libs you have to make sure that these libs also include the RTTI code. HIH Guido -- The biggest improvement in performance is the non-working-to-working transition. -- John Ousterhout