From: Carsten F. <CarstenFuchs@T-Online.de> - 2010-11-25 23:34:34
|
Hi all, compiling Assimp under Ubuntu 10.10, using a custom build script, I found that the ai_assert(haveit); statement in Subdivision.cpp is problematic, because ai_assert() is implemented with the DEBUG macro, while haveit depends on _DEBUG. A quick grep -RI "[^_]DEBUG" . in the Assimp directory reveals that DEBUG is *only* used with ai_assert(), everywhere else _DEBUG is used (which is automatically defined by VC++ when /MTd is used). So for consistency, what do you think of this patch? Index: include/aiAssert.h =================================================================== --- include/aiAssert.h (revision 190) +++ include/aiAssert.h (working copy) @@ -19,7 +19,7 @@ //! \def ai_assert //! \brief ASSIMP specific assertion test -#ifdef DEBUG +#ifdef _DEBUG # define ai_assert(expression) if( !(expression)) Assimp::aiAssert( #expression, __LINE__, __FILE__); #else # define ai_assert(expression) and maybe Index: include/aiDefines.h =================================================================== --- include/aiDefines.h (revision 190) +++ include/aiDefines.h (working copy) @@ -214,7 +214,7 @@ # define AI_C_THREADSAFE #endif // !! ASSIMP_BUILD_SINGLETHREADED -#if (defined _DEBUG || defined DEBUG) // one of the two should be defined .. +#ifdef _DEBUG # define ASSIMP_BUILD_DEBUG #endif Best regards, Carsten -- Cafu - the open-source Game and Graphics Engine for multiplayer, cross-platform, real-time 3D Action Learn more at http://www.cafu.de |