О спасибочки, кое-что получилось.
Но всё равно мутно всё как-то)
Пользователь решил продолжить мысль 07 Сентября 2010, 19:08:01:
http://www.postgresql.org/docs/8.0/static/libpq-example.htmlполностью скопипастила текст проги, удовлетворила зависимости. не компилится(((
$ gcc -o test1 test1.c
/tmp/ccfaGnQe.o: In function `exit_nicely':
test1.c:(.text+0x14): undefined reference to `PQfinish'
/tmp/ccfaGnQe.o: In function `main':
test1.c:(.text+0x58): undefined reference to `PQconnectdb'
test1.c:(.text+0x68): undefined reference to `PQstatus'
test1.c:(.text+0x78): undefined reference to `PQerrorMessage'
test1.c:(.text+0xb4): undefined reference to `PQexec'
test1.c:(.text+0xc4): undefined reference to `PQresultStatus'
test1.c:(.text+0xd5): undefined reference to `PQerrorMessage'
test1.c:(.text+0x100): undefined reference to `PQclear'
test1.c:(.text+0x118): undefined reference to `PQclear'
test1.c:(.text+0x129): undefined reference to `PQexec'
test1.c:(.text+0x139): undefined reference to `PQresultStatus'
test1.c:(.text+0x14a): undefined reference to `PQerrorMessage'
test1.c:(.text+0x175): undefined reference to `PQclear'
test1.c:(.text+0x18d): undefined reference to `PQclear'
test1.c:(.text+0x19e): undefined reference to `PQexec'
test1.c:(.text+0x1ae): undefined reference to `PQresultStatus'
test1.c:(.text+0x1bf): undefined reference to `PQerrorMessage'
test1.c:(.text+0x1ea): undefined reference to `PQclear'
test1.c:(.text+0x202): undefined reference to `PQnfields'
test1.c:(.text+0x21f): undefined reference to `PQfname'
test1.c:(.text+0x273): undefined reference to `PQgetvalue'
test1.c:(.text+0x2b1): undefined reference to `PQntuples'
test1.c:(.text+0x2c2): undefined reference to `PQclear'
test1.c:(.text+0x2d3): undefined reference to `PQexec'
test1.c:(.text+0x2e3): undefined reference to `PQclear'
test1.c:(.text+0x2f4): undefined reference to `PQexec'
test1.c:(.text+0x304): undefined reference to `PQclear'
test1.c:(.text+0x310): undefined reference to `PQfinish'
collect2: ld returned 1 exit status