[Insight-users] ITK undefining min and max macros causes GdiplusTypes.h to not compile

Mike Tabaczynski mjt1 at rcn.com
Tue Jul 18 17:35:09 EDT 2006


Hi

In the ITK installed file \ITK\ITKConfig.cmake, the line
"SET(ITK_REQUIRED_CXX_FLAGS " -DNOMINMAX")" undefines the min and max macros
causing the Microsoft GdiplusTypes.h file to not compile. This doesn't
happen when building the examples. I don't include that file anywhere in my
code. Just a guess, but maybe my project includes .h files in some
combination that wasn't tried during ITK testing?

The best workaround I can find is to just modify ITKConfig.cmake and delete
that line. I couldn't find anything in the cmake or ITK doc about how to fix
or override this build behavior. Is there something I can do in my project
CMakeLists.txt? Looking through the ITK files I don't really see why ITK
undefines the min and max macros in the first place.

Thanks
MikeT


More information about the Insight-users mailing list