Hi, The
xalan-c\src\xalanc\Include\PlatformDefinitions.hpp.in throws an error if the compile options _DEBUG and NDEBUG are both defined for the Visual Studio compiler. Unfortunately, perhaps because of a bug, cmake generates this combination of Visual Studio compiler command-line options for a Debug build, causing massive compile failures when trying to build a debug version of xalan-c on Windows. The only workaround for this problem I could find is to comment out the relevant lines in PlatformDefinitions.hpp.in: #if defined(_MSC_VER) #pragma warning(disable: 4127 4146 4251 4284 4345 4351 4355 4511 4512 4514 4521 4702 4710 4711 4786 4097 4503 4786; error: 4150 4172 4238 4239 4715) #include <basetsd.h> // Note: this no longer seems necessary with current MSVC #if !defined(__INTEL_COMPILER) && _MSC_VER >= 1400 #define XALAN_AUTO_PTR_REQUIRES_DEFINITION #endif #if defined(_DEBUG) && defined(NDEBUG) // #error NDEBUG must not be defined when _DEBUG is defined. #elif !defined(_DEBUG) && !defined(NDEBUG) // #error NDEBUG must be defined when _DEBUG is not defined. #endif #endif // _MSC_VER I don't see the value of this _DEBUG/NDEBUG check. It is especially irritating for Release builds because you have to add the NDEBUG option into the Visual Studio solution every time you create a new solution that depends on xalan-c. I suggest removing the check from PlatformDefinitions. Paul
