Re:

From: "amp " <amp(at)foomonkey(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re:
Date: 2001-11-12 19:51:07
Message-ID: 200111121451.AA171769954@foomonkey.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thanks. I assume this means I should have a file on my system named libpq. If so, I can't find it. Where should it be located? If I don't have it, where can I get it? Is there an rpm somewhere that has development libraries? I have checked out the rpms on my redhat cd's and I can't find it there either.

Also, should my command look like this?

gcc -Wall -o test1 test1.c -lpq

I have the include file. It is in /usr/include/pgsql/libpq-fe.h.

Thanks again.
Andrew Pierce

---------- Original Message ----------------------------------
From: John Burski <John(dot)Burski(at)911ep(dot)com>
Date: Mon, 12 Nov 2001 11:53:56 -0600

>Looks like you're missing the "-lpq" linker reference.
>
>Also, don't forget to include the "/usr/include/pgsql/libpq-fe.h" file
>in your source. (You know the drill ... #include <pgsql/libpq-fe.h> )
>
>Check out the Programmer docs closely, they helped me a lot.
>
>Best regards,
>
>amp wrote:
>
>> Hello,
>>
>> I have a new linux system running RedHat 7.2. The Postgreqsl installation I have is the one that came with RH. I downloaded all the pdfs for Administration, Programmer, Tutorial, etc. I am trying to write a simple C program to use the database I just created. My command line looks like this:
>>
>> gcc -Wall -o test1 test1.c
>>
>> >From this, I get a long list of 'Undefined Reference' errors for any function that starts with 'PQ'.
>>
>> I assume I am missing a library or something. I am new to Linux programming (although I am an experienced C/C++ programmer under windows).
>>
>> What am I missing? Thanks in advance.
>>

Responses

  • Re: at 2001-11-12 20:39:50 from John Burski

Browse pgsql-novice by date

  From Date Subject
Next Message John Burski 2001-11-12 20:39:50 Re:
Previous Message Brian 2001-11-12 18:54:22 Re: SQL Question