postgres.h missing? (fwd)
postgres.h missing? (fwd)
От:
"Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>
Дата:
Hi tom, (erased your reply by accident :( I asked about this yesterday but I don't need postgres.h for building PHP. I need it for writing a C function. So do I just copy it manually from src/include/ ? TIA, thalis ---------- Forwarded message ---------- Date: Tue, 19 Jun 2001 18:04:56 -0400 (EDT) From: Thalis A. Kalfigopoulos To: pgsql-general@postgresql.org Subject: postgres.h missing? I can see in the source dir the include file postgres.h (src/include/postgres.h) but it doesn't exist under the installation dir (under include I only have postgres_ext.h and _fe.h). Located a related article (http://faqchest.dynhost.com/prgm/pgsql-l/pgsql-01/pgsql-0104/pgsql-010404/pgsql01040314_23260.html) which implies that at least for the php build, postgres_fe.h should do just fine (even though the opening comments in postgres_fe.h suggest that postgres.h should be in the same dir and used instead) Did I miss building something or should I use postgres_fe.h instead? TIA, thalis
Re: postgres.h missing? (fwd)
От:
Vince Vielhaber <vev@michvhf.com>
Дата:
On Wed, 20 Jun 2001, Thalis A. Kalfigopoulos wrote:
> Hi tom, (erased your reply by accident :(
> I asked about this yesterday but I don't need postgres.h for building PHP. I need it for writing a C function.
> So do I just copy it manually from src/include/ ?
add -I/usr/local/pgsql/include and -L/usr/local/pgsql/lib
as appropriate in your makefile or compile script (or environment)
and they'll be picked up automatically.
Adjust the path to where your PostgreSQL installation is as necessary.
Vince.
>
> TIA,
> thalis
>
> ---------- Forwarded message ----------
> Date: Tue, 19 Jun 2001 18:04:56 -0400 (EDT)
> From: Thalis A. Kalfigopoulos
> To: pgsql-general@postgresql.org
> Subject: postgres.h missing?
>
> I can see in the source dir the include file postgres.h (src/include/postgres.h) but it doesn't exist under the installation dir (under include I only have postgres_ext.h and _fe.h).
> Located a related article (http://faqchest.dynhost.com/prgm/pgsql-l/pgsql-01/pgsql-0104/pgsql-010404/pgsql01040314_23260.html) which implies that at least for the php build, postgres_fe.h should do just fine (even though the opening comments in postgres_fe.h suggest that postgres.h should be in the same dir and used instead)
>
> Did I miss building something or should I use postgres_fe.h instead?
>
> TIA,
> thalis
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
Re: postgres.h missing? (fwd)
От:
"Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>
Дата:
On Wed, 20 Jun 2001, Vince Vielhaber wrote: > On Wed, 20 Jun 2001, Thalis A. Kalfigopoulos wrote: > > > Hi tom, (erased your reply by accident :( > > I asked about this yesterday but I don't need postgres.h for building PHP. I need it for writing a C function. > > So do I just copy it manually from src/include/ ? > > add -I/usr/local/pgsql/include and -L/usr/local/pgsql/lib > > as appropriate in your makefile or compile script (or environment) > and they'll be picked up automatically. > > Adjust the path to where your PostgreSQL installation is as necessary. > > Vince. That is not the issue but thanks anyway for the effort. The problem pertained: $ gcc -fpic -c -I/usr/local/pgsql/include/ cfunc.c In file included from cfunc.c:2: /usr/local/pgsql/include/postgres.h:49: utils/elog.h: No such file or directory /usr/local/pgsql/include/postgres.h:50: utils/palloc.h: No such file or directory So I actually used the postgres.h file from the src directory to make it work. $ gcc -fpic -c -I/usr/local/tmp/postgresql-7.1.2/src/include/ cfunc.c What I'm missing is: did I mis-build something? How come the postgres.h and rest .h files weren't properly installed? thanks, thalis > > > > > > TIA, > > thalis > > > > ---------- Forwarded message ---------- > > Date: Tue, 19 Jun 2001 18:04:56 -0400 (EDT) > > From: Thalis A. Kalfigopoulos > > To: pgsql-general@postgresql.org > > Subject: postgres.h missing? > > > > I can see in the source dir the include file postgres.h (src/include/postgres.h) but it doesn't exist under the installation dir (under include I only have postgres_ext.h and _fe.h). > > Located a related article (http://faqchest.dynhost.com/prgm/pgsql-l/pgsql-01/pgsql-0104/pgsql-010404/pgsql01040314_23260.html) which implies that at least for the php build, postgres_fe.h should do just fine (even though the opening comments in postgres_fe.h suggest that postgres.h should be in the same dir and used instead) > > > > Did I miss building something or should I use postgres_fe.h instead? > > > > TIA, > > thalis > > > > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 6: Have you searched our list archives? > > > > http://www.postgresql.org/search.mpl > > > > -- > ========================================================================== > Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net > 56K Nationwide Dialup from $16.00/mo at Pop4 Networking > Online Campground Directory http://www.camping-usa.com > Online Giftshop Superstore http://www.cloudninegifts.com > ========================================================================== > > > >
Re: postgres.h missing? (fwd)
От:
Vince Vielhaber <vev@michvhf.com>
Дата:
On Wed, 20 Jun 2001, Thalis A. Kalfigopoulos wrote:
> On Wed, 20 Jun 2001, Vince Vielhaber wrote:
>
> > On Wed, 20 Jun 2001, Thalis A. Kalfigopoulos wrote:
> >
> > > Hi tom, (erased your reply by accident :(
> > > I asked about this yesterday but I don't need postgres.h for building PHP. I need it for writing a C function.
> > > So do I just copy it manually from src/include/ ?
> >
> > add -I/usr/local/pgsql/include and -L/usr/local/pgsql/lib
> >
> > as appropriate in your makefile or compile script (or environment)
> > and they'll be picked up automatically.
> >
> > Adjust the path to where your PostgreSQL installation is as necessary.
> >
> > Vince.
>
> That is not the issue but thanks anyway for the effort. The problem pertained:
> $ gcc -fpic -c -I/usr/local/pgsql/include/ cfunc.c
> In file included from cfunc.c:2:
> /usr/local/pgsql/include/postgres.h:49: utils/elog.h: No such file or directory
> /usr/local/pgsql/include/postgres.h:50: utils/palloc.h: No such file or directory
>
> So I actually used the postgres.h file from the src directory to make it work.
> $ gcc -fpic -c -I/usr/local/tmp/postgresql-7.1.2/src/include/ cfunc.c
>
> What I'm missing is: did I mis-build something? How come the postgres.h and rest .h files weren't properly installed?
Should I assume correctly that cfunc.c is something you wrote? If it is,
instead of including postgresql.h, try including libpq-fe.h as that's the
file that's installed. That should give you everything you need.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
Re: postgres.h missing? (fwd)
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Thalis A. Kalfigopoulos" writes: > So do I just copy it manually from src/include/ ? >> >> add -I/usr/local/pgsql/include and -L/usr/local/pgsql/lib To do backend code development, you need to either add a -I pointing at the source include tree, or do make install-all-headers. If you are talking about client-side code, it probably shouldn't depend on any of the backend-side headers. regards, tom lane