Received: from scotts.mynetwork.net (pb-dsl-008.pacificnet.net [209.204.27.8]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4F0MdA62308 for ; Mon, 14 May 2001 20:22:40 -0400 (EDT) (envelope-from sholmes@pacificnet.net) Received: from pacificnet.net (IDENT:scott@localhost [127.0.0.1]) by scotts.mynetwork.net (8.9.3/8.9.3) with ESMTP id RAA26991 for ; Mon, 14 May 2001 17:21:54 -0700 Message-Id: <200105150021.RAA26991@scotts.mynetwork.net> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.3 To: pgsql-interfaces@postgresql.org (PG-Interfaces) Subject: Compiling Test Programs Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 14 May 2001 17:21:54 -0700 From: Scott Holmes X-Archive-Number: 200105/69 X-Sequence-Number: 1596 I am by no means a C programmer and I don't know much about Makefiles so I need a little assistance here. I have Postgresql7.1 compiled from the tar ball and it's working fine. But now I need to write a program using libpg. I have psql working fine as well as PHP4 so I've assumed libpg has been included in my installation. But when I go to compile testlibpq.c I get: gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -Wl,-rpath,/usr/local/pgsql/lib testlibpq.c -o testlibpq /tmp/ccy2shMg.o: In function `exit_nicely': /tmp/ccy2shMg.o(.text+0x7): undefined reference to `PQfinish' /tmp/ccy2shMg.o: In function `main': /tmp/ccy2shMg.o(.text+0x30): undefined reference to `PQsetdbLogin' /tmp/ccy2shMg.o(.text+0x39): undefined reference to `PQstatus' ... /tmp/ccy2shMg.o(.text+0x205): undefined reference to `PQfinish' collect2: ld returned 1 exit status make: *** [testlibpq] Error 1 I do have /usr/local/pgsql/lib/libpq.a Perhaps someone can point me in the proper direction.