Error compiling postgresql UDT in visual studio 2008 - Mailing list pgsql-general

From Brijesh Shrivastav
Subject Error compiling postgresql UDT in visual studio 2008
Date
Msg-id 5774D66D5EC83645A99B3A905527BB710786125D@zipwire.esri.com
Whole thread Raw
List pgsql-general

Hi!

 

We are in the process of moving our development environment

to visual studio 2008 and as a part of that process I tried to build 

our postgresql extended UDT in that environment. I ran into typedef

redefinition error because visual studio 2008 header file crtdefs.h

typedef  errcode as an int whereas postgres header files (elog.h) defines

a function by the same name. Following is the error I got:

 

\\aisak\8.3\include\server\utils/elog.h(105) : error C2365: 'errcode' : redefinition; previous definition was 'typedef'

        C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\crtdefs.h(548) : see declaration of 'errcode'

 

Has anyone else run into this? Any ideas how to handle it?

 

Thanks,

Brijesh

 

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_locks "at-a-glance" view
Next
From: Garry Saddington
Date:
Subject: Re: Losing data