You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "David Dunkle (JIRA)" <xe...@xml.apache.org> on 2005/11/28 19:20:37 UTC

[jira] Created: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

building for Windows-XP AMD64 has compile errors and warnings
-------------------------------------------------------------

         Key: XERCESC-1531
         URL: http://issues.apache.org/jira/browse/XERCESC-1531
     Project: Xerces-C++
        Type: New Feature
  Components: Build  
    Versions: 2.7.0    
 Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
    Reporter: David Dunkle


David Dunkle wrote:
> We would like a working xerces-C++ for Windows XP 64, specifically 
> AMD64. I am starting to try to build the source for this platform 
> using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> have some questions.
>  
> 1) I have seen one or two other people asking about this in the email 
> archives, but before I go to far, I would like to know if anyone has 
> gotten a functional xerces for 64 bit Windows.
> 2) We would like to build with VC8, but there is no VC8 project in the 
> 2.7.0 release. Should we plan on creating one?
> 3) I have most of the subprojects now compiling and linking for me, 
> without changing any source, but I still see 3 compile errors and many 
> disturbing compiler warnings.
>  
> The warnings:
>  
> The most bothersome warnings seem to me to be those where "long" is 
> assumed to be 64 bits; on this platform, I believe that long is 32 
> bits even though pointers are 64. At least according to Microsoft's 
> documentation. An example warning is below, but there are many more.
>  
> Configuration: Debug x64 ------
> Compiling...
> PSVIWriterHandlers.cpp
> ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> : warning C4244: 'return' : conversion from '__int64'
> to 'unsigned long', possible loss of data
>  

I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.

> Is there a some way to deal with these kind of warnings that I don't 
> understand built into xerces, or should we plan on changing the 
> source? The problem seems pretty systemic.
>  
> Here are the errors.
>  
> Are there known solutions for these errors or should we plan on fixing 
> the xerces source?
>  
> ------ Build started: Project: PSVIWriter,
> Configuration: Debug x64 ------
> Compiling...
...

> ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> : error C2440: 'type cast' : cannot convert from 
> 'xercesc_2_7::XSObject *' to 'unsigned long'
>         The target is not large enough

The fix for this is a bit complicated, so I'll have to work on a fix for this.

> Build log was saved at
> "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> PSVIWriter - 1 error(s), 2 warning(s)
> ------ Build started: Project: xml4com, Configuration:
> Debug x64 ------
> Compiling...
> XMLHTTPRequest.cpp
> ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> : warning C4996: '_tcsncpy' was declared deprecated
>         C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
>         Message: 'This function or variable may be unsafe. Consider 
> using _tcsncpy_s instead. To disable deprecation, use 
> _CRT_SECURE_NO_DEPRECATE. See online help for details.'

This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.

Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.

...

> Build log was saved at
> "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> xml4com - 2 error(s), 8 warning(s)
> ------ Build started: Project: MemHandlerTest,
> Configuration: Debug x64 ------
> Compiling...
> SimpleHashPtr.cpp
> ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> to 'long'
>         The target is not large enough

The fix is to cast size_t instead of long.  I will check in a fix for this.

If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.

Dave


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518259 ] 

Boris Kolpackov commented on XERCESC-1531:
------------------------------------------

I did a quick grep in the util directory for 'unsigned int' and there are many cases where this type is used for things like indexes in strings and arrays, sizes, etc. These all have the potential of requiring more than 32 bit to store a valid value. I think in order to have a true 64 bit port we will need to get rid of those (and other uses of types like int, long, etc.).


> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>            Assignee: Alberto Massari
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493207 ] 

Alberto Massari edited comment on XERCESC-1531 at 6/12/07 1:40 PM:
-------------------------------------------------------------------

Patch to use XMLSize_t when dealing with memory pointers, unsigned int when dealing with numbers, XMLFilePos when dealing with file size or absolute positions


 was:
Path to use XMLSize_t when dealing with memory pointers, unsigned int when dealing with numbers, XMLFilePos when dealing with file size or absolute positions

> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493444 ] 

Alberto Massari commented on XERCESC-1531:
------------------------------------------

Hi Boris,
as a starter, I followed the warnings to detect mismatch; so XMLBuffer and XMLString have now XMLSize_t as the type for the 'length' arguments (but not all the XMLString methods, only the one I found misused - the work, if it is deemed to be correct, should be completed), while RefVectorArrayOf, DOMStringList, DOMNamedNodeMap and other collections use unsigned int for both index and size. The interfaces that reads and write data (XMLTranscoder, BinInputStream and BinOutStream) use a 64-bit integer to return the curPos, and XMLSize_t to specify the size of the buffers.
I stopped patching types when I hit user-visible interfaces like SAX (e.g. the length reported by characters and ignorableWhitespace); if we want to fully convert Xerces to be 64-bit safe, this is the time (before 3.0 ships), but there must be a consensus on the changes that the user will see.

Alberto

> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "James Berry (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504109 ] 

James Berry commented on XERCESC-1531:
--------------------------------------

Just for the record, I'm in favor of this patch. James.

> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-1531.
--------------------------------------

    Resolution: Fixed
      Assignee: Alberto Massari

I think I have fixed all the places that needed to be fixed. Please verify if I made mistakes that the tests didn't catch....

Alberto

> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>            Assignee: Alberto Massari
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493428 ] 

Boris Kolpackov commented on XERCESC-1531:
------------------------------------------

Alberto,

I haven't looked at the patch but I have a few questions. Have you actually checked every "int" and "long" usage or were you simply following VC2005 warnings and fixing stuff until all are gone? Also in your patch description you say "unsigned int when dealing with numbers". Does it mean things like string length, etc. (as found in XMLString) are still 32 bit?

thanks,
-boris


> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov updated XERCESC-1531:
-------------------------------------

    Attachment: win64.patch

> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493206 ] 

Alberto Massari commented on XERCESC-1531:
------------------------------------------

I have been playing with VS2005 with the 'detect 64 bit portability issues' flag, and tried to fix all the misuses of unsigned int/XMLSize_t/XMLFilePos. 
The patch is big, and the changes to the API are extensive (even if, when working on 32 bit, it will probably be just a naming change, as size_t and unsigned int are both 32 bit). I am attaching the patch here so that someone else can test it and vote on whether it should be committed.

Alberto

> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493093 ] 

Boris Kolpackov commented on XERCESC-1531:
------------------------------------------

In order to build a 64 bit version with this compiler one needs to change the definitions for XMLSize_t and XMLSSize_t in VCPPDefs.hpp since with this compiler long int is 32 bit even in 64 bit mode. After this change there are many more warnings (~200) and a couple of errors. The attached patch provides the neccessary changes for VCPPDefs.hpp and fixes the errors.

After studying the warnings (most of which are potential data loss related) it became clear that they are not Windows-specific. There is a multitude of places in Xerces-C++ where various sizes are passed as 32 bit integers while potentially being 64 bit wide. I grep'ed for "unsigned int" in the util directory and got over 2000 places most of which need to be changed to a 64 bit type. This appears to be a serious problem in Xerces-C++. I wonder if there are any plans to address this?


> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493492 ] 

Boris Kolpackov commented on XERCESC-1531:
------------------------------------------

Alberto,

I think your patch is a step forward but won't make much difference unless followed by an audit of every place where a 32 bit integer is used and the value could potentially be 64 bit wide. This is going to be a significant amount of work since there are tons of such places. I am definitely in favour of this change and willing to help with implementing it for 3.0.

-boris


> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESC-1531) building for Windows-XP AMD64 has compile errors and warnings

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari updated XERCESC-1531:
-------------------------------------

    Attachment: size_t.patch

Path to use XMLSize_t when dealing with memory pointers, unsigned int when dealing with numbers, XMLFilePos when dealing with file size or absolute positions

> building for Windows-XP AMD64 has compile errors and warnings
> -------------------------------------------------------------
>
>                 Key: XERCESC-1531
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1531
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 2.7.0
>         Environment: Windows XP AMD64 built with Visual Studio 2005 Final Version
>            Reporter: David Dunkle
>         Attachments: size_t.patch, win64.patch
>
>
> David Dunkle wrote:
> > We would like a working xerces-C++ for Windows XP 64, specifically 
> > AMD64. I am starting to try to build the source for this platform 
> > using Visual Studio 8 (Visual Studio 2005 - the final version), and I 
> > have some questions.
> >  
> > 1) I have seen one or two other people asking about this in the email 
> > archives, but before I go to far, I would like to know if anyone has 
> > gotten a functional xerces for 64 bit Windows.
> > 2) We would like to build with VC8, but there is no VC8 project in the 
> > 2.7.0 release. Should we plan on creating one?
> > 3) I have most of the subprojects now compiling and linking for me, 
> > without changing any source, but I still see 3 compile errors and many 
> > disturbing compiler warnings.
> >  
> > The warnings:
> >  
> > The most bothersome warnings seem to me to be those where "long" is 
> > assumed to be 64 bits; on this platform, I believe that long is 32 
> > bits even though pointers are 64. At least according to Microsoft's 
> > documentation. An example warning is below, but there are many more.
> >  
> > Configuration: Debug x64 ------
> > Compiling...
> > PSVIWriterHandlers.cpp
> > ..\..\..\..\..\src\xercesc/internal/XSerializeEngine.hpp(818)
> > : warning C4244: 'return' : conversion from '__int64'
> > to 'unsigned long', possible loss of data
> >  
> I've already prepared a patch for this warning, but it means a change in the public API, so it cannot go in until the 3.0 release.  For the time being, you can ignore it.
> > Is there a some way to deal with these kind of warnings that I don't 
> > understand built into xerces, or should we plan on changing the 
> > source? The problem seems pretty systemic.
> >  
> > Here are the errors.
> >  
> > Are there known solutions for these errors or should we plan on fixing 
> > the xerces source?
> >  
> > ------ Build started: Project: PSVIWriter,
> > Configuration: Debug x64 ------
> > Compiling...
> ...
> > ..\..\..\..\..\samples\PSVIWriter\PSVIWriterHandlers.cpp(1617)
> > : error C2440: 'type cast' : cannot convert from 
> > 'xercesc_2_7::XSObject *' to 'unsigned long'
> >         The target is not large enough
> The fix for this is a bit complicated, so I'll have to work on a fix for this.
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\PSVIWriter\x64\Debug\BuildLog.htm"
> > PSVIWriter - 1 error(s), 2 warning(s)
> > ------ Build started: Project: xml4com, Configuration:
> > Debug x64 ------
> > Compiling...
> > XMLHTTPRequest.cpp
> > ..\..\..\..\..\src\xercesc\com\XMLHTTPRequest.cpp(40)
> > : warning C4996: '_tcsncpy' was declared deprecated
> >         C:\Program Files (x86)\Microsoft Visual Studio
> > 8\VC\include\tchar.h(1467) : see declaration of '_tcsncpy'
> >         Message: 'This function or variable may be unsafe. Consider 
> > using _tcsncpy_s instead. To disable deprecation, use 
> > _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> This is Microsoft's idea of a joke, I guess.  They are trying to become security conscious, so they decided to mark all sort of functions as "deprecated."  You can ignore these errors.  I will be checking in a fix that disables them.
> Also, I suspect you will have to disable the COM wrappers, because they will probably not build in 64-bit mode.  I don't think anyone is even maintaining them now, and I'm not sure if COM can work with 64-bit applications.
> ...
> > Build log was saved at
> > "file://c:\ddunkleworkspace\mytests\xerces-c-src_2_7_0\Projects\Win32\VC8\xerces-all\xerces-com\x64\Debug\BuildLog.htm"
> > xml4com - 2 error(s), 8 warning(s)
> > ------ Build started: Project: MemHandlerTest,
> > Configuration: Debug x64 ------
> > Compiling...
> > SimpleHashPtr.cpp
> > ..\..\..\..\..\tests\MemHandlerTest\SimpleHashPtr.cpp(32)
> > : error C2440: 'type cast' : cannot convert from 'const void *const ' 
> > to 'long'
> >         The target is not large enough
> The fix is to cast size_t instead of long.  I will check in a fix for this.
> If you want to track these fixes, feel free to create Jira enhancement request, and I'll make sure to update it when the fixes are in the SVN repository.
> Dave

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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