From: Jim Morcombe <jim@seekchrist.org>
To: pgsql-interfaces@postgresql.org
Subject: A problem with libpq
Date: Tue, 08 Feb 2005 11:08:19 +0800
Message-ID: <36qoq4F54bg5qU1@individual.net> (raw)
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.
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: jim@seekchrist.org
Subject: Re: A problem with libpq
In-Reply-To: <36qoq4F54bg5qU1@individual.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