[Insight-developers] Re: [Insight-users] Fixing bugs for ITK with
MinGW
Tomáš Kazmar
Tomash.Kazmar at seznam.cz
Thu Aug 30 18:11:59 EDT 2007
# Unfortunately, ITK has this little unresolved bug with MinGW. Could someone with
# CVS access apply this simple patch:
#
# In /Utilities/itkjpeg/jmorecfg.h.in, somewhere before line 286, this should be
# added:
#
# -----------------------------------------------
# #if defined(__MINGW32__) && defined(_RPCNDR_H) && !defined(HAVE_BOOLEAN)
# #define HAVE_BOOLEAN
# #endif
# -----------------------------------------------
We discussed precisely this issue which arised in MinGW with win32api ver. >= 3.8.
As it is a problem with win32api header files, it is present in both MinGW and Cygwin.
I already sent a patch to itk-developers mailing list but it seems it was not applied to
cvs. Could someone please check it in?
Regards,
Tomas
I attach the patch, as well as the discussion from June 18th:
#To avoid confusion: new version of win32api's rpcndr.h contains definitions of both
#_RPCNDR_H, __RPCNDR_H__ and a typedef for boolean whereas old version
#contains only __RPCNDR_H__.
#
#Tomas
#
## ------------ Původní zpráva ------------
## Od: Mathieu Malaterre <mathieu.malaterre at gmail.com>
## Předmět: Re: patch to compile ITK2.8.0 on current MinGW/Cygwin (w32api>=3.8)
## Datum: 18.6.2007 14:18:16
## ----------------------------------------
## Forwarding to Brad King. Since he is the original author of the patch.
##
## Brad, looks like on MinGW __RPCNDR_H__ is not defined as expected after all.
##
## Thanks
## -Mathieu
##
## On 6/18/07, Tomáš Kazmar <Tomash.Kazmar at seznam.cz> wrote:
## > Hi,
## >
## > I do not know where to submit a patch for a bug that breaks compilation of
## > ITK2.8.0 on current MinGW/Cygwin, so I decided to send it to you directly.
## > If I am to submit the patch elsewhere, please tell me.
## >
## > In current MinGW/Cygwin there was added a definition of boolean and
## > a "symbol already defined" error is thrown for
## ITK/Utilities/itkjpeg/jmorecfg.h.
## > I suggest to patch jconfig.h.in like this:
## >
## > 24c24,25
## > < #if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
## > ---
## > > #if defined(_WIN32) && !((defined(__CYGWIN__) || defined(__MINGW32__)) \
## > > && !defined(_RPCNDR_H))
## >
## > This is not a really nice solution but the only one that works. Because
## w32api.h
## > is not included in jconfig.h.in, we could not test for something like
## > W32API_VERSION < 308, neither there is any useful version information in
## > rpcndr.h itself (file where boolean is newly defined), the only thing left is
## to test for
## > !defined(_RPCNDR_H) which is coincidentally introduced in the same version of
## > rpcndr.h as the typedef.
## >
## >
## > Regards,
## > Tomas
## >
##
##
## --
## Mathieu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: =?us-ascii?Q?jconfig=2Eh=2Ein=2Epatch?=
Type: text/x-patch
Size: 188 bytes
Desc: not available
Url : http://www.itk.org/mailman/private/insight-developers/attachments/20070831/f56a5e74/us-asciiQjconfig2Eh2Ein2Epatch.bin
More information about the Insight-developers
mailing list