What about libpq-fe.h ?

Started by Nonameabout 24 years ago3 messagesgeneral
Jump to latest
#1Noname
Taurus2000@t-online.de

Hi !

I have small problem with compiling a programm which uses
libpq-fe.h ($Id: libpq-fe.h,v 1.80 2001/11/08 20:37:52 momjian Exp $) ...
When i wana compile the programm i get the error
'sizeof appliend to an incomplete type' for statement sizeof(PGconn)
so the question is: for the statement 'typedef struct pg_conn PGconn;'
what about the struct pg_conn ?
how get libpq-fe.h access to struct pg_conn ?
and finally ... how can i fix it ?

mfg,
Antonio

#2Tim Barnard
tbarnard@povn.com
In reply to: Noname (#1)
Re: What about libpq-fe.h ?

You can find what your looking for in libpq-int.h, but it's advised that you
not include that header in your applications as it's not the official api
header (libpq-fe.h is). You risk your app breaking in future revisions (see
the comments at the top of the file). Perhaps you should consider rethinking
what you're trying to do unless you *really* need this.

Tim

----- Original Message -----
From: "Done" <Taurus2000@t-online.de>
To: <pgsql-interfaces@postgresql.org>
Sent: Saturday, February 16, 2002 3:21 PM
Subject: What about libpq-fe.h ?

Show quoted text

Hi !

I have small problem with compiling a programm which uses
libpq-fe.h ($Id: libpq-fe.h,v 1.80 2001/11/08 20:37:52 momjian Exp $) ...
When i wana compile the programm i get the error
'sizeof appliend to an incomplete type' for statement sizeof(PGconn)
so the question is: for the statement 'typedef struct pg_conn PGconn;'
what about the struct pg_conn ?
how get libpq-fe.h access to struct pg_conn ?
and finally ... how can i fix it ?

mfg,
Antonio

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: What about libpq-fe.h ?

Taurus2000@t-online.de (Done) writes:

When i wana compile the programm i get the error
'sizeof appliend to an incomplete type' for statement sizeof(PGconn)

Why do you want to compute sizeof(PGconn)? I can't think of any valid
reason for a client application to do that.

regards, tom lane