Problems with c, compiling, libraries

Поиск
Список
Период
Сортировка
От Kirby Krueger
Тема Problems with c, compiling, libraries
Дата
Msg-id LHEPILOHLNIGBPAOJMNJIEDPCBAA.kirbyk@idiom.com
обсуждение исходный текст
Ответы Re: Problems with c, compiling, libraries  (HK <harikrishnan@midascomm.com>)
Список pgsql-novice
Greetings.

I'm trying to compile a C program that connects to a postgreSQL database.
I'm successfully getting past the compile step, with:
#include "/usr/include/pgsql/libpq-fe.h"

However, in the link step, I get lots of things like:
/home/kirbyk/ugxProcessTurn.c:1954: undefined reference to `PQexec'
/home/kirbyk/ugxProcessTurn.c:1955: undefined reference to `PQresultStatus'
/home/kirbyk/ugxProcessTurn.c:1958: undefined reference to `PQclear'
/home/kirbyk/ugxProcessTurn.c:1960: undefined reference to `PQgetvalue'
/home/kirbyk/ugxProcessTurn.c:1961: undefined reference to `PQgetvalue'
/home/kirbyk/ugxProcessTurn.c:1975: undefined reference to `PQexec'

... and so on.

I suspect that some libraries didn't get installed in the right place.  I'm
not responsible for that sort of thing, but the guy who is claimed that he
installed all the development packages for postgreSQL.

I don't see anything that would be useful in /usr/lib.  There is a
/usr/lib/pgsql, which contains:
plpgsql.so*  pltcl.so*

I tried including these in the link step, but they clearly are for some
purpose other than the functions in libpq-fe.h.

Can someone give me some pointers?  My productivity has ground to a
screeching halt trying to figure this out.  The names of the libraries I
ought to have installed would be very helpful; what rpms to get them from
would be even moreso.  We're running a recent version of RedHat Linux.

Thanks for any assistance!

-- Kirby


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Chad Thompson"
Дата:
Сообщение: Re: Inner join syntax
Следующее
От: Josh Berkus
Дата:
Сообщение: Missing Review