pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Vick <avick@remote-print.com>
To: pgsql-ports@postgresql.org
Subject: errcode redefinition
Date: Thu, 15 Jun 2006 15:44:02 -0500
Message-ID: <4491C692.9080401@remote-print.com> (raw)

I am trying to build the Postgres drivers for Qt on Windows.  I am consistantly running into a problem where the Postgres function "errcode" conflicts with a typedef of the stame name (typedef int errcode).  Has anyone else had this problem?  Has anyone solved this problem?  Is there a better list to post this to?  

According to the archives (http://archives.postgresql.org/pgsql-hackers/2006-05/msg01259.php), there is a patch applied to the 8.1 stable branch (http://archives.postgresql.org/pgsql-hackers/2006-05/msg01317.php) but compiling that branch and building with that does not fix the problem.

Version information:
	Postgres 8.1, but I'd settle for any 7.x or 8.x
	I have successfully installed the 8.1 version (binaries for windows), and I have also successfully built the postgres libraries from CVS source (REL8_1_STABLE branch).  
	Visual Studio 2005, Standard edition
	Qt 3.3.6, Enterprise edition
	Windows XP 2002 SP2
	Cygwin

This appears to be specific to VS2005.  VS6 plays well with Postgres 7.4, and VS.NET 2002 plays well with Postgres 8.0

The error message:
        "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"
        cl -c -FIqt_pch.h -Yuqt_pch.h -Fptmp\obj\debug_mt_shared\qt-mt_pch.pch -nologo -Zm200 -wd4996 -W3 -w34100 -w34189 -MDd -Zi  -EHsc -EHsc -GR -DQT_SHARED -DQT_THREAD_SUPPORT -DQT_ACCESSIBILITY_SUPPORT -DUNICODE -DWIN32 -DQT_MAKEDLL -DQT_THREAD_SUPPORT -DQT_NO_CUPS -DQT_NO_NIS -DQT_SQL_POSTGRES -DQT_NO_IMAGEIO_MNG -DQT_NO_STYLE_MAC -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_COMPACT -DQT_NO_STYLE_POCKETPC -DQT_DLL -DQT_MAKEDLL -I"C:\Postgres\8.1\include" -I"C:\Postgres\8.1\include\server" -I"tmp" -I"3rdparty\libjpeg" -I"3rdparty\libpng" -I"3rdparty\zlib" -I"C:\Qt\3.3.6\include" -I"." -I"tmp\moc\debug_mt_shared" -I"C:\Qt\3.3.6\mkspecs\win32-msvc2005" -Fotmp\obj\debug_mt_shared\ @C:\DOCUME~1\DEVELO~1\LOCALS~1\Temp\nm30D.tmp
qsql_psql.cpp
c:\postgres\8.1\include\server\utils/elog.h(105) : error C2365: 'errcode' : redefinition; previous definition was 'typedef'
        C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\crtdefs.h(506) : see declaration of 'errcode'

There were also other problems with missing header files and "configure" oddities but I worked around these.

Any help would be greatly appreciated.

-Andrew Vick



view thread (6+ messages)  latest in thread

Message-ID: <4491C692.9080401@remote-print.com>
Permalink:  ../4491C692.9080401@remote-print.com/
Also on:    postgresql.org/message-id/4491C692.9080401@remote-print.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-ports@postgresql.org
  Cc: avick@remote-print.com
  Subject: Re: errcode redefinition
  In-Reply-To: <4491C692.9080401@remote-print.com>
  References: <4491C692.9080401@remote-print.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox