DEBUG_NEW and DirectX
-
We are using the February 2006 version of DirectX. When we insert the following line: #define new DEBUG_NEW we get the following errors from the Directx Modules: c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(392) : error C2059: syntax error : 'string' c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(392) : error C2091: function returns function c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(392) : error C2802: static member 'operator new' has no formal parameters c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(393) : error C2059: syntax error : 'string' c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(393) : error C2090: function returns array c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.inl(987 ) : error C2761: 'void *(__cdecl *_D3DXMATRIXA16::operator new(void))(size_t)' : member function redeclaration not allowed c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.inl(987 ) : fatal error C1903: unable to recover from previous error(s); stopping compil ation How can we take advantage of the DEBUG_NEW capability and also get around these errors? BRC
-
We are using the February 2006 version of DirectX. When we insert the following line: #define new DEBUG_NEW we get the following errors from the Directx Modules: c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(392) : error C2059: syntax error : 'string' c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(392) : error C2091: function returns function c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(392) : error C2802: static member 'operator new' has no formal parameters c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(393) : error C2059: syntax error : 'string' c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.h(393) : error C2090: function returns array c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.inl(987 ) : error C2761: 'void *(__cdecl *_D3DXMATRIXA16::operator new(void))(size_t)' : member function redeclaration not allowed c:\program files\microsoft directx sdk (february 2006)\include\d3dx9math.inl(987 ) : fatal error C1903: unable to recover from previous error(s); stopping compil ation How can we take advantage of the DEBUG_NEW capability and also get around these errors? BRC
Defining DEBUG_NEW after any included header files has always worked for me. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Defining DEBUG_NEW after any included header files has always worked for me. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Ok - I'll try that. We wanted to define the DEBUG_NEW option in a general header file, but we will include it later on.