Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1IGAYE18794 for ; Mon, 18 Feb 2002 11:10:34 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g1IGAYI23875; Mon, 18 Feb 2002 11:10:34 -0500 (EST) From: Bruce Momjian Message-Id: <200202181610.g1IGAYI23875@candle.pha.pa.us> Subject: Re: Programming for PostgreSQL In-Reply-To: To: Liam DeMasi Date: Mon, 18 Feb 2002 11:10:34 -0500 (EST) CC: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL96 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200202/217 X-Sequence-Number: 3373 Liam DeMasi wrote: > I am new to database development and programming and administration. I am > using PostgreSQL 7.1.3. > > I am trying to run a simple program to insert data into a database. > > I am having a problem compiling the program. I am following directions from > Bruce Momjian's book called "PostgreSQL Introduction and Concepts" > > it instructs me to complie for C++ using the following format: > g++ -I/usr/local/pgsql/include -o myapp > myapp.cpp -L/usr/local/pgsql/lib -lpq++ Strange, try this: g++ -I/usr/local/pgsql/include -o myapp myapp.cpp -L/usr/local/pgsql/lib -lpq++ -lpq -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026