[ 
https://issues.apache.org/jira/browse/XERCESC-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365734#comment-16365734
 ] 

Scott Morgan commented on XERCESC-2137:
---------------------------------------

Yes, MFC apps in Debug mode throw build errors without the XERCES_MFC_SUPPORT 
items.

 

Basic steps to reproduce:
 # In Visual Studio, create an MFC app
 # Open up the app's main .cpp file (same as project name)
 # include <xercesc/util/XMLString.hpp>
 # In app's InitInstance function add in

{code:java}
XMLCh tempStr[100];
XERCES_CPP_NAMESPACE::XMLString::transcode("abc", tempStr, 99){code}

 # Compile file in debug mode. You get a load of errors that tie back to 
operator new use. Release mode is okay.

 

Doesn't seem to hit plain win32 apps.

> CMake Build Doesn't Activate XERCES_MFC_SUPPORT
> -----------------------------------------------
>
>                 Key: XERCESC-2137
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2137
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>         Environment: MS Visual Studio
>            Reporter: Scott Morgan
>            Priority: Major
>         Attachments: mfc_debug_cmake.patch
>
>
> The XERCES_MFC_SUPPORT define is needed for Visual Studio debug builds, it 
> activates some code in XMemory.hpp/cpp
> Should just be a case of detecting MSVC in the main CMakeLists.txt and adding 
> a '#cmakedefine XERCES_MFC_SUPPORT' line in 
> Xerces_autoconf_config.hpp.cmake.in



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to