Re: Interface to posgresql

From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: makhan <emoazzam(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Interface to posgresql
Date: 2007-03-03 10:56:27
Message-ID: 45E9545B.9000309@Sheeky.Biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

makhan wrote:
> Hi
>
> I am trying to connect to the postgresql and make quries usuing my
> application in c language using the libpq library.can you please tell me how
> to setup the enviromnet and where to place files so that I can run examples
> given on the libpq site.( if I use gcc compiler on linux or borland turbo c)
>
> Regards
The standard placing for the files is /usr/lib for libpq and
/usr/include for the header files.

These paths should be standard search paths for gcc

I believe the linux installs have these files as part of the devel
install - the postgresql-devel-xxx rpm - you will need to install that.

If you have done a manual setup and build from source then /usr would be
replaced with the prefix path used (./configure --prefix=...)
eg. /usr/local/pgsql/lib is a common one.

For gcc HEADER_SEARCH_PATHS is used for headers and LIBRARY_SEARCH_PATHS
for libs. Or -I can be used as an option to gcc and -L with ld when
linking. eg gcc -I /usr/local/pgsql/include myprog.c

--

Shane Ambler
pgSQL(at)Sheeky(dot)Biz

Get Sheeky @ http://Sheeky.Biz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Dorbath 2007-03-03 11:37:15 Re: I'd love to know what the rest of this error message is.
Previous Message makhan 2007-03-03 09:02:42 Interface to posgresql