erros when making examples in /src/test/examples
От | Wei Wang |
---|---|
Тема | erros when making examples in /src/test/examples |
Дата | |
Msg-id | 20020530131122.6cd42c01.ww220@cl.cam.ac.uk обсуждение исходный текст |
Ответы |
Re: erros when making examples in /src/test/examples
|
Список | pgsql-general |
Hi, I am just trying to make the frontend programs in /src/test/examples make all gives errors: gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -Wl,-rpath,/local/scratch-1/ww220/postgresql-7.1.3/lib testlibpq.c -o testlibpq testlibpq.c: In function `exit_nicely': testlibpq.c:14: warning: implicit declaration of function `exit' /tmp/ccNom46z.o: In function `exit_nicely': /tmp/ccNom46z.o(.text+0xa): undefined reference to `PQfinish' /tmp/ccNom46z.o: In function `main': /tmp/ccNom46z.o(.text+0x3c): undefined reference to `PQsetdbLogin' /tmp/ccNom46z.o(.text+0x48): undefined reference to `PQstatus' /tmp/ccNom46z.o(.text+0x69): undefined reference to `PQerrorMessage' /tmp/ccNom46z.o(.text+0x99): undefined reference to `PQexec' /tmp/ccNom46z.o(.text+0xa3): undefined reference to `PQresultStatus' /tmp/ccNom46z.o(.text+0xc4): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0xd9): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0xe8): undefined reference to `PQexec' /tmp/ccNom46z.o(.text+0xf2): undefined reference to `PQresultStatus' /tmp/ccNom46z.o(.text+0x113): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0x128): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0x137): undefined reference to `PQexec' /tmp/ccNom46z.o(.text+0x141): undefined reference to `PQresultStatus' /tmp/ccNom46z.o(.text+0x164): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0x17b): undefined reference to `PQnfields' /tmp/ccNom46z.o(.text+0x192): undefined reference to `PQfname' /tmp/ccNom46z.o(.text+0x1cf): undefined reference to `PQgetvalue' /tmp/ccNom46z.o(.text+0x200): undefined reference to `PQntuples' /tmp/ccNom46z.o(.text+0x210): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0x21f): undefined reference to `PQexec' /tmp/ccNom46z.o(.text+0x229): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0x238): undefined reference to `PQexec' /tmp/ccNom46z.o(.text+0x242): undefined reference to `PQclear' /tmp/ccNom46z.o(.text+0x24b): undefined reference to `PQfinish' collect2: ld returned 1 exit status make: *** [testlibpq] Error 1 Afte searching on the net, I added -lpq but the result is not positive: gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include testlibpq.c -o testlibpq -lpq testlibpq.c: In function `exit_nicely': testlibpq.c:14: warning: implicit declaration of function `exit' /usr/bin/ld: cannot find -lpq collect2: ld returned 1 exit status What am I missing here? Many thanks, Wei
В списке pgsql-general по дате отправления: