我在 Debian 中安装 postgresql 8.4,将程序 testlibpq.c 从http://www.postgresql.org/docs/9.0/interactive/libpq-example.html放到具有文件 libpq-fe.h 的目录中,但在编译之后gcc 给我写信
testlibpq.c:(.text+0x4a): undefined reference to `PQconnectdb'
testlibpq.c:(.text+0x5a): undefined reference to `PQstatus'
testlibpq.c:(.text+0x6f): undefined reference to `PQerrorMessage'
testlibpq.c:(.text+0xa9): undefined reference to `PQexec'
testlibpq.c:(.text+0xb9): undefined reference to `PQresultStatus'
testlibpq.c:(.text+0xcf): undefined reference to `PQerrorMessage'
testlibpq.c:(.text+0xf5): undefined reference to `PQclear'
testlibpq.c:(.text+0x10d): undefined reference to `PQclear'
testlibpq.c:(.text+0x121): undefined reference to `PQexec'
...等我必须做些什么来纠正工作?