A problem with libpq - Mailing list pgsql-interfaces

From Jim Morcombe
Subject A problem with libpq
Date
Msg-id 36qoq4F54bg5qU1@individual.net
Whole thread Raw
List pgsql-interfaces
Can anyone help me with this problem?

I have installed postgresql-7.2.1 and am trying to compile one of the 
test programs from the directory src/test/examples.

I have compiled the example successfully on my Red Hat Linux machine and 
now need to compile it on my SCO machine but keep getting errors that 
seem to mean that I have forgotten to use the "-lpq" option when 
compiling.  I am running an old version of SCO Openserver 5

I am using the following command:
 cc testlibpq.c -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpq 
-otestlibpq

I receive the following error messages:

undefined                       first referenced symbol                             in file
PQfinish                            testlibpq.o
PQsetdbLogin                        testlibpq.o
PQstatus                            testlibpq.o
PQerrorMessage                      testlibpq.o
PQexec                              testlibpq.o
PQresultStatus                      testlibpq.o
PQclear                             testlibpq.o
PQnfields                           testlibpq.o
PQfname                             testlibpq.o
PQgetvalue                          testlibpq.o
PQntuples                           testlibpq.o
ld fatal: Symbol referencing errors. No output written to testlibpq

As far as I can see (and I am unfamiliar with libraries, etc) 
/usr/local/pgsql/lib seems okay.  It has the following files in it:

-rw-r--r--   1 root     sys        79756 Jul 30  2002 libpq.a
-rwxr-xr-x   1 root     sys        67600 Jul 30  2002 libpq.so@
-rwxr-xr-x   1 root     sys        67600 Jul 30  2002 libpq.so.2@
-rwxr-xr-x   1 root     sys        67600 Jul 30  2002 libpq.so.2.2

In my ignorance, I take it that libpq.so.2.2 is the real file and that 
libpq.so is simply a link to it.


pgsql-interfaces by date:

Previous
From: "Dave Page"
Date:
Subject: Re: [ODBC] odbc.sql?
Next
From: "Goulet, Dick"
Date:
Subject: Re: Can you bind output variables?