Problems linking to libpq - Mailing list pgsql-novice

From Jim Morcombe
Subject Problems linking to libpq
Date
Msg-id 000f01c22c7d$44c39e00$526567cb@BYRONICS
Whole thread Raw
Responses Re: Problems linking to libpq  (Andrew McMillan <andrew@catalyst.net.nz>)
List pgsql-novice
have started at the beginning of the PostSQL Programmer's Guide and have typed in part of example 1.1 on page 23.
 
I have followed the instructions in section 1.12 for building the program.
 
The program compiles cleanly using the instructions in the manual :
    cc -I/usr/local/pgsql/include jim.c
 
I then compile it with the instruction
    cc -o jim jim.o -L/usr/local/pgsql/lib -lpq
 
However, I get the following errors:
 
Undefined symbol
PQfinish
PQsetdbLogin
pqstatus
fprint
PQerrorMessage
 
The manual says this occurs if I forgot the -lpq option, which I have not done.
 
I am using SCO Unix.
 
Can anyone help me?
 
Jim Morcoombe
 

pgsql-novice by date:

Previous
From: "Hano de la Rouviere"
Date:
Subject: Re: How can I tell what port my postgreSQL server is running on?
Next
From: Peter Eisentraut
Date:
Subject: Re: [SQL] Seeding