Re: - Mailing list pgsql-novice

From amp
Subject Re:
Date
Msg-id 200111121451.AA171769954@foomonkey.com
Whole thread Raw
In response to  ("calios" <calios@celcom.net.my>)
List 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
checkedout 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.Burski@911ep.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
downloadedall the pdfs for Administration, Programmer, Tutorial, etc.  I am trying to write a simple C program to use
thedatabase 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++
programmerunder windows).    
>>
>> What am I missing? Thanks in advance.
>>


pgsql-novice by date:

Previous
From: Brian
Date:
Subject: Re: SQL Question
Next
From: "Josh Berkus"
Date:
Subject: Re: XML & Postgresql