Re: errcode redefinition

From: Andrew Vick <avick(at)remote-print(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: errcode redefinition
Date: 2006-06-15 21:24:51
Message-ID: 4491D023.7050407@remote-print.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Tom Lane wrote:
> Andrew Vick <avick(at)remote-print(dot)com> writes:
>
>>I am trying to build the Postgres drivers for Qt on Windows.
>
>
> Why are these drivers trying to include elog.h? That's a backend-only
> header. If the reason is that they're including postgres.h, they should
> likely be including postgres_fe.h instead.

That is the case. I tried switching it to postgres_fe.h, but then I got errors about the pg_type structure not being defined. It appears that the CATALOG macro (which defines the structure) is defined in postgres.h but not in postgres_fe.h. I don't see any other headers in src/ which do define it.

I worked around this by switching back to postgres.h, and #defining ELOG_H above postgres.h (to block elog.h). Nonoptimal, but it gets the compile going again.

Thanks for the suggestion; knowing that elog.h was backend only gave me the courage to exclude it.

-Andrew Vick

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2006-06-15 21:31:28 Re: errcode redefinition
Previous Message Tom Lane 2006-06-15 21:01:23 Re: errcode redefinition