You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Hermann Walth (JIRA)" <ji...@apache.org> on 2018/06/04 14:19:00 UTC
[jira] [Created] (XALANC-782) Mismatched types when compiling Xalan
on Windows with native wchar_t
Hermann Walth created XALANC-782:
------------------------------------
Summary: Mismatched types when compiling Xalan on Windows with native wchar_t
Key: XALANC-782
URL: https://issues.apache.org/jira/browse/XALANC-782
Project: XalanC
Issue Type: Bug
Affects Versions: 1.10
Reporter: Hermann Walth
Assignee: Steven J. Hathaway
I have the following scenario:
I built Xerces C++ 2.7 successfully with the flag /Zc:wchar_t set, using Visual Studio 2017.
If I now try to build Xalan C++ 1.10 with Visual Studio 2017 (by opening and retargeting the provided solution VC7.1/Xalan.sln), I get error messages like the following:
{code:java}
C2664: 'void XalanFileOutputStream::write(const char *,unsigned int)': cannot convert argument 1 from 'XMLCh [512]' to 'const UTF16Ch *' (xml-xalan\c\src\xalanc\utils\msgcreator\icureshandler.cpp:89){code}
The problem here is that XalanFileOutputStream::write expects to be called with an array of XMLCh (which Xerces defines to be native wchar_t), but is actually called with an array of UTF16Ch (which is a type alias of unsigned short). Hence, there is a type error.
I also get the error
{code:java}
C1083: Cannot open include file: 'LocalMsgIndex.hpp': No such file or directory (xml-xalan\c\src\xalanc\xslt\elemtemplateelement.hpp:45)
{code}
Is there a way to successfully compile Xalan 1.10 even with the flag /Zc:wchar_t set? I don't want to set this flag because it causes other problems in my codebase, and I updating to Xalan 1.11 and to Xerces 3.x would take some effort because both libraries changed their API without a clear migration guide.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org