Re: Problems with c, compiling, libraries

From: HK <harikrishnan(at)midascomm(dot)com>
To: Kirby Krueger <kirbyk(at)idiom(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Problems with c, compiling, libraries
Date: 2002-10-12 06:13:47
Message-ID: Pine.LNX.4.33.0210121142210.23737-100000@daisy.midascomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi kirby,
compile ur C program with -lpq. That should solve it.
regards,
hari

On Fri, 11 Oct 2002, Kirby Krueger wrote:

> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Le Hibou 2002-10-13 21:58:45 Problem with varchar
Previous Message Ludwig Lim 2002-10-12 03:03:11 Re: Fw: Trigger Function