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.
---------- 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.
>> 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.
- Re: at 2001-11-12 20:39:50 from John Burski
pgsql-novice by date
|Next:||From: John Burski||Date: 2001-11-12 20:39:50|
|Subject: Re: |
|Previous:||From: Brian||Date: 2001-11-12 18:54:22|
|Subject: Re: SQL Question|