From: | Olivier Cherrier <Olivier(dot)Cherrier(at)cediti(dot)be> |
---|---|
To: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | compile error using libpq |
Date: | 2001-06-08 12:57:51 |
Message-ID: | BB863FBA3E3CAE4DAC430686AD28EA56038912@brisefer.cediti.be |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello.
I try to compile the 1.1 example code which is shown at the page
http://postgresql.mirror.easynet.be/users-lounge/docs/7.1/programmer/libpq-e
xample.html.
I run OpenBSD 2.9 (i386) and I installed the 7.1 Postgresql client
interface.
I do the following:
<<
bash-2.04$
bash-2.04$
bash-2.04$
bash-2.04$ gcc -v -I/usr/local/include/postgresql/ -o testlibpq testlibpq.c
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd2.9/2.95.3/specs
gcc version 2.95.3 20010125 (prerelease)
/usr/lib/gcc-lib/i386-unknown-openbsd2.9/2.95.3/cpp0 -lang-c -v
-I/usr/local/include/post
gresql/ -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__unix__ -D__i386__ -D__OpenBSD__
-D__unix__ -D
__i386__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(i386)
-Amachine(i386) testli
bpq.c /tmp/cctlz476.i
GNU CPP version 2.95.3 20010125 (prerelease) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/postgresql
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/include/g++
End of omitted list.
/usr/lib/gcc-lib/i386-unknown-openbsd2.9/2.95.3/cc1 /tmp/cctlz476.i -quiet
-dumpbase test
libpq.c -version -o /tmp/ccLqy476.s
GNU C version 2.95.3 20010125 (prerelease) (i386-unknown-openbsd2.9)
compiled by GNU C ver
sion 2.95.3 20010125 (prerelease).
as -o /tmp/ccSis476.o /tmp/ccLqy476.s
/usr/lib/gcc-lib/i386-unknown-openbsd2.9/2.95.3/collect2 -e start -dc -dp
-o testlibpq /u
sr/lib/crt0.o -L/usr/lib/gcc-lib/i386-unknown-openbsd2.9/2.95.3
/tmp/ccSis476.o -lgcc -lc
-lgcc
/tmp/ccSis476.o: Undefined symbol `_PQfinish' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQsetdbLogin' referenced from text
segment
/tmp/ccSis476.o: Undefined symbol `_PQstatus' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQerrorMessage' referenced from text
segment
/tmp/ccSis476.o: Undefined symbol `_PQexec' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQresultStatus' referenced from text
segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQexec' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQresultStatus' referenced from text
segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQexec' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQresultStatus' referenced from text
segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQnfields' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQfname' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQntuples' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQgetvalue' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQexec' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQexec' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQclear' referenced from text segment
/tmp/ccSis476.o: Undefined symbol `_PQfinish' referenced from text segment
collect2: ld returned 1 exit status
>>
There is a linking problem.
Could someone help me in special params that I have to pass to gcc?
Thanks.
Olivier
PS: Sorry for my first mail which went out accidentaly.
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Jehannet | 2001-06-08 13:07:27 | Re: Re: why unsigned numbers don't exist ? |
Previous Message | Marc SCHAEFER | 2001-06-08 12:54:53 | Re: Skipping duplicate records? |