Problems with c, compiling, libraries

From: "Kirby Krueger" <kirbyk(at)idiom(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Problems with c, compiling, libraries
Date: 2002-10-11 20:08:34
Message-ID: LHEPILOHLNIGBPAOJMNJIEDPCBAA.kirbyk@idiom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andy Pearce 2002-10-11 23:10:00 Fw: Trigger Function
Previous Message Chad Thompson 2002-10-11 16:30:02 Re: Inner join syntax