> db3.c: In function `main':
> db3.c:37: warning: assignment makes pointer from integer without a cas
> t
> /tmp/ccXf6woP.o: In function `exit_nicely':
> /tmp/ccXf6woP.o(.text+0x8): undefined reference to `PQfinish'
> /tmp/ccXf6woP.o: In function `main':
> /tmp/ccXf6woP.o(.text+0x6f): undefined reference to `PQsetdbLogin'
> /tmp/ccXf6woP.o(.text+0x80): undefined reference to `PQstatus'
> /tmp/ccXf6woP.o(.text+0xaa): undefined reference to `PQerrorMessage'
> /tmp/ccXf6woP.o(.text+0xdd): undefined reference to `PQexec'
> /tmp/ccXf6woP.o(.text+0xf4): undefined reference to `PQresultStatus'
> /tmp/ccXf6woP.o(.text+0x11c): undefined reference to `PQclear'
> /tmp/ccXf6woP.o(.text+0x134): undefined reference to `PQclear'
> /tmp/ccXf6woP.o(.text+0x153): undefined reference to `PQconsumeInput'
>
> /tmp/ccXf6woP.o(.text+0x165): undefined reference to `PQnotifies'
> /tmp/ccXf6woP.o(.text+0x1b7): undefined reference to `PQfinish'
> collect2: ld returned 1 exit status
헤더의 문제가 아니라 라이브러리를 넣지 않으신것 아닙니까?
라이브러리를 추가하신 후에 다시 해 보십시오.
인천의 나사 풀린 산호...
아차차...
gcc a.c /L/usr/local/pgsql/lib /lpq
이런 식입니다.
(전 예전 터보C를 한 것이 마지막이라 몰라요. 그나마 unix계열은...)
|