Tom Lane wrote:
> Andrew Vick <avick@remote-print.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