[jira] [Commented] (XERCESC-2137) CMake Build Doesn't Activate XERCES_MFC_SUPPORT

2018-02-16 Thread Scott Morgan (JIRA)

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

Scott Morgan commented on XERCESC-2137:
---

That mfc-support branch compiles fine for me.

 

Good job.

> 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: 0001-cmake-Add-mfc-debug-option.patch, 
> 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



[jira] [Commented] (XERCESC-2137) CMake Build Doesn't Activate XERCES_MFC_SUPPORT

2018-02-15 Thread Roger Leigh (JIRA)

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

Roger Leigh commented on XERCESC-2137:
--

[~blumf] Please could you try testing with the attached patch.  Also available 
here if it's easier: 
[https://github.com/rleigh-codelibre/xerces-c/tree/mfc-support]

 

Should be enabled by default, though you can disable if you wish, which matches 
the defaults of the 3.1 MSVC configuration header.  This is based on your 
patch, but matches the style of the existing options and adds some 
documentation.

 

Thanks,

Roger

> 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: 0001-cmake-Add-mfc-debug-option.patch, 
> 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



[jira] [Commented] (XERCESC-2137) CMake Build Doesn't Activate XERCES_MFC_SUPPORT

2018-02-15 Thread Scott Morgan (JIRA)

[ 
https://issues.apache.org/jira/browse/XERCESC-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 
 # 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



[jira] [Commented] (XERCESC-2137) CMake Build Doesn't Activate XERCES_MFC_SUPPORT

2018-02-15 Thread Roger Leigh (JIRA)

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

Roger Leigh commented on XERCESC-2137:
--

The fix is pretty straightforward.  I can apply this with a bit of extra 
documentation.

 

What's actually breaking here?  I do daily debug builds and I've never had a 
problem.  Does you project need to be explicitly using MFC stuff for this to be 
an issue?

> 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



[jira] [Commented] (XERCESC-2137) CMake Build Doesn't Activate XERCES_MFC_SUPPORT

2018-02-15 Thread Scott Morgan (JIRA)

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

Scott Morgan commented on XERCESC-2137:
---

Debug build of Xerces under Visual Studio don't work without them. VC++/MFC 
uses some alternate memory operators in that mode which is covered by that 
XERCES_MFC_SUPPORT define.

 

It's a pretty easy fix: [^mfc_debug_cmake.patch]

> 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



[jira] [Commented] (XERCESC-2137) CMake Build Doesn't Activate XERCES_MFC_SUPPORT

2018-02-15 Thread Roger Leigh (JIRA)

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

Roger Leigh commented on XERCESC-2137:
--

The code in XMemory appears to be just stubs that delegate to operator 
new(size), and there are no callers in the tree.  As far as I can tell, it's 
completely pointless and does nothing at all!  We could likely delete them with 
no functional impact.

 

Did you need them for any specific purpose?  I'm not an MFC expert; if there's 
a good reason to have this we can write the necessary CMake logic to detect MFC 
support is available and enable it.  But if it's non-functional, we might be 
better removing it entirely?

 

> 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
>
> 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