Re: config.h name clash
Tomasz Wegrzanowski <taw@users.sourceforge.net>
From: Tomasz Wegrzanowski <taw@users.sourceforge.net>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-bugs@postgresql.org
Date: 2001-05-30T13:44:08Z
Lists: pgsql-bugs
On Tue, May 29, 2001 at 10:03:49PM +0200, Peter Eisentraut wrote:
> Tomasz Wegrzanowski writes:
>
> > My program uses autoconf and libpq++. Unfortunatelly autoconf's
> > config.h and poetgresql's config.h name-clashes and either libpq++.h
> > includes autoconf's config.h or program files include postgresql's
> > config.h
>
> Put -I. before -I<libpq++dir> in your compiler flags.
That won't work.
program.c:
#include "config.h"
#includes <libpq++.h>
<libpq++dir>/libpq++.h:
#include "libpq++/pgconnection.h"
<libpq++dir>/libpq++/pgconnection.h:
#include "config.h"
Lines `#include "config.h"' must include different files,
preferably in right order.
Both `-I. -I<libpq++dir>' and `-I<libpq++dir> -I.'
includes only one of `config.h's twice.