Received: from rm-rstar.sfu.ca (root@rm-rstar.sfu.ca [142.58.120.21]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA74045 for ; Fri, 21 Jan 2000 11:35:28 -0500 (EST) (envelope-from blackw@sfu.ca) Received: from sfu.ca (jung.psyc.sfu.ca [142.58.172.8]) by rm-rstar.sfu.ca (8.9.2/8.9.2/SFU-5.0H) with ESMTP id IAA27621 for ; Fri, 21 Jan 2000 08:35:27 -0800 (PST) Message-ID: <38888ACE.926133A9@sfu.ca> Date: Fri, 21 Jan 2000 08:35:26 -0800 From: Richard Reply-To: blackw@sfu.ca X-Mailer: Mozilla 4.5 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] Linking problems References: <1BF7C7482189D211B03F00805F8527F748C46C@S-NATH-EXCH2> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thank-you, Mike. Before posting, I did do some searches on various pgsql mail lists and rummaged through the docs, but I didn't find any mention of this. Not to say it isn't there. But if it is, it isn't very obvious. I'd have expected it to be in the "libpq C++ Binding" section of the Programmer docs. It isn't. Last night in I downgraded to 6.5.2, and my test app linked fine WITHOUT the -lpq option! Is that link option requirement specific to 6.5.3? Cheers, Richard "Ansley, Michael" wrote: > > You need to link to libpq as well (-lpq), so this line: > gcc -o testsql testsql.o -lm -lstdc++ -lpq++ > > should look like this: > gcc -o testsql testsql.o -lm -lstdc++ -lpq++ -lpq > > Is this on the FAQ somewhere, because I've seen a couple of people asking > about this? >