File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,17 @@ THE SOFTWARE
32
32
#include < string>
33
33
#include < memory>
34
34
35
+ // extra namespace to trigger LNK2019 on binary incompatible builds
36
+ // instead of crashing at runtime
37
+ #if defined(_MSC_VER) && defined(_DEBUG)
38
+ #define OGRE_DEBUG_NS_BEGIN namespace DEBUG_BUILD_REQUIRED {
39
+ #define OGRE_DEBUG_NS_END }
40
+ namespace Ogre { namespace DEBUG_BUILD_REQUIRED { } using namespace DEBUG_BUILD_REQUIRED ; }
41
+ #else
42
+ #define OGRE_DEBUG_NS_BEGIN
43
+ #define OGRE_DEBUG_NS_END
44
+ #endif
45
+
35
46
namespace Ogre {
36
47
#define OGRE_TOKEN_PASTE_INNER (x, y ) x ## y
37
48
#define OGRE_TOKEN_PASTE (x, y ) OGRE_TOKEN_PASTE_INNER(x, y)
@@ -211,7 +222,9 @@ namespace Ogre {
211
222
class ResourceGroupManager ;
212
223
class ResourceManager ;
213
224
class RibbonTrail ;
225
+ OGRE_DEBUG_NS_BEGIN
214
226
class Root ;
227
+ OGRE_DEBUG_NS_END
215
228
class SceneManager ;
216
229
class SceneNode ;
217
230
class SceneQuery ;
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ namespace Ogre
55
55
// / Scene manager instances, indexed by instance name
56
56
typedef std::map<String, SceneManager*> SceneManagerInstanceMap;
57
57
58
+ OGRE_DEBUG_NS_BEGIN
59
+
58
60
/* * The root class of the Ogre system.
59
61
60
62
The Ogre::Root class represents a starting point for the client
@@ -925,6 +927,7 @@ namespace Ogre
925
927
*/
926
928
Real getDefaultMinPixelSize () { return mDefaultMinPixelSize ; }
927
929
};
930
+ OGRE_DEBUG_NS_END
928
931
/* * @} */
929
932
/* * @} */
930
933
} // Namespace Ogre
You can’t perform that action at this time.
0 commit comments