From: | Jim Morcombe <jim(at)seekchrist(dot)org> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | A problem with libpq |
Date: | 2005-02-08 03:08:19 |
Message-ID: | 36qoq4F54bg5qU1@individual.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Crosland | 2005-02-08 06:18:21 | Can you bind output variables? |
Previous Message | Tom Lane | 2005-02-07 16:21:27 | Re: Problem with asynchronous connect in 8.0.1 |