Error compiling postgresql UDT in visual studio 2008

From: "Brijesh Shrivastav" <Bshrivastav(at)esri(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Error compiling postgresql UDT in visual studio 2008
Date: 2008-06-19 16:17:03
Message-ID: 5774D66D5EC83645A99B3A905527BB710786125D@zipwire.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Garry Saddington 2008-06-19 16:38:53 Re: Losing data
Previous Message Alvaro Herrera 2008-06-19 16:11:43 Re: pg_locks "at-a-glance" view