I had this problem when going from 2.2 to 2.3. I removed the offending code block, reordered the includes for the windows code and got a successful build.
-----Original Message----- From: Tsuyoshi Moriyama [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 2:03 PM To: [EMAIL PROTECTED] Subject: overridden new() might have a problem? [Environment] VC++ 6.0 SP5, Win2k/XP, Xerces 2.3.0 I incorporated DOMPrint sample into my own program (basically), but when I include either DOMTreeErrorReporter.hpp or DOMPrintErrorHandler.hpp *before* the following section: #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif (which is automatically inserted by MSDev), I got the following compilation error: aaa.cpp(70) : error C2661: 'new' : no overloaded function takes 3 parameters, while if I include it *after* the section, the error message turns to: c:\program files\microsoft visual studio\vc98\include\xercesc\util\xmemory.hpp(94) : error C2061: syntax error : identifier 'THIS_FILE' c:\program files\microsoft visual studio\vc98\include\xercesc\util\xmemory.hpp(94) : error C2091: function returns function c:\program files\microsoft visual studio\vc98\include\xercesc\util\xmemory.hpp(94) : error C2802: static member 'operator new' has no formal parameters c:\program files\microsoft visual studio\vc98\include\xercesc\util\xmemory.hpp(102) : error C2061: syntax error : identifier 'THIS_FILE' c:\program files\microsoft visual studio\vc98\include\xercesc\util\xmemory.hpp(102) : error C2091: function returns function c:\program files\microsoft visual studio\vc98\include\xercesc\util\xmemory.hpp(102) : error C2556: 'void *(__cdecl *__cdecl xercesc_2_3::XMemory::operator new(void))(unsigned int,class xercesc_2_3::MemoryManager *)' : overloaded function differs onl y by return type from 'void *(__cdecl *__cdecl xercesc_2_3::XMemory::operator new(void))(unsigned int)' c:\program files\microsoft visual studio\vc98\include\xercesc\util\xmemory.hpp(94) : see declaration of 'new' aaa.cpp(23) : fatal error C1903: unable to recover from previous error(s); stopping compilation Error executing cl.exe. In either way, I can't compile my program. Do you have any idea how I can fix that? Tsuyoshi Moriyama [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
