pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Holmes <sholmes@pacificnet.net>
To: pgsql-interfaces@postgresql.org
Subject: Compiling Test Programs
Date: Mon, 14 May 2001 17:21:54 -0700
Message-ID: <200105150021.RAA26991@scotts.mynetwork.net> (raw)

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.






view thread (2+ messages)  latest in thread

Message-ID: <200105150021.RAA26991@scotts.mynetwork.net>
Permalink:  ../200105150021.RAA26991@scotts.mynetwork.net/
Also on:    postgresql.org/message-id/200105150021.RAA26991@scotts.mynetwork.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: sholmes@pacificnet.net
  Subject: Re: Compiling Test Programs
  In-Reply-To: <200105150021.RAA26991@scotts.mynetwork.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox