From: | "Mathew Chandy" <mathew(dot)chandy(at)eximsoft(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | problems in compiling |
Date: | 2000-10-05 05:12:35 |
Message-ID: | 000e01c02e8a$dfd86800$4b0a0a0a@exim.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello sir,
Whenever I compile the following sample code
# include <stdio.h>
# include <pgsql/libpq-fe.h>
void
exit_nicely(PGconn *conn)
{
PQfinish(conn);
exit(1);
}
main()
{
char *pghost,
*pgport,
*pgoptions,
*pgtty;
char *dbName;
int nFields;
int i,
j;
/* FILE *debug; */
.........
}
i get a compilation error which is of the following
/tmp/ccTCPDUs.o(.text+0x77): undefined reference to `PQstatus'
/tmp/ccTCPDUs.o(.text+0xa1): undefined reference to `PQerrorMessage'
/tmp/ccTCPDUs.o(.text+0xd4): undefined reference to `PQexec'
/tmp/ccTCPDUs.o(.text+0xeb): undefined reference to `PQresultStatus'
/tmp/ccTCPDUs.o(.text+0x118): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x130): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x141): undefined reference to `PQexec'
/tmp/ccTCPDUs.o(.text+0x158): undefined reference to `PQresultStatus'
/tmp/ccTCPDUs.o(.text+0x180): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x198): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x1a9): undefined reference to `PQexec'
/tmp/ccTCPDUs.o(.text+0x1c0): undefined reference to `PQresultStatus'
/tmp/ccTCPDUs.o(.text+0x1e8): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x200): undefined reference to `PQnfields'
/tmp/ccTCPDUs.o(.text+0x229): undefined reference to `PQfname'
/tmp/ccTCPDUs.o(.text+0x265): undefined reference to `PQntuples'
/tmp/ccTCPDUs.o(.text+0x29d): undefined reference to `PQgetvalue'
/tmp/ccTCPDUs.o(.text+0x2d7): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x2e8): undefined reference to `PQexec'
/tmp/ccTCPDUs.o(.text+0x2f9): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x30a): undefined reference to `PQexec'
/tmp/ccTCPDUs.o(.text+0x31b): undefined reference to `PQclear'
/tmp/ccTCPDUs.o(.text+0x327): undefined reference to `PQfinish'
what is the reason . i use the folowing command line cc file.c
thanks in advance
Mathew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-10-05 06:18:51 | Re: -F option, RAM usage, more... |
Previous Message | Kendall Koning | 2000-10-04 23:49:17 | CIDR index use for '<<' operator |