我在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'
Run Code Online (Sandbox Code Playgroud)
......等我必须考虑做些什么来纠正工作?