[xsd-users] Problem for parsing CityGML using xsd v4.1.0.a11

Miao Wang miaowang.tw at gmail.com
Mon Dec 13 21:54:25 EST 2021


Boris Kolpackov <boris at codesynthesis.com> 於 2021年12月13日 週一 下午7:28寫道:

> Miao Wang <miaowang.tw at gmail.com> writes:
>
> > Finally, I success in building XSD after modifying the followings for
> > [config.build]:
> >
> > [...] And disable warning 4819 for encoding problem
>
> Could you provide more detail on what was the issue that made you add
> /wd4819? The text of the actual warning from the compiler would be
> ideal.
>
> If warning 4819 is not disabled, the error message is:
error C2220: warning treated as error
warning C4819: The file contains a character that cannot be represented in
the current code page (950)

This happens on the following files:
C:\xsd-build\libxsd-msvc-release\libicuuc-65.1.0+6\libicu/uc\unicode/stringoptions.h(1)
C:\xsd-build\libxsd-msvc-release\libicuuc-65.1.0+6\libicu/uc\unicode/uchar.h(2360)
C:\xsd-build\libxsd-msvc-release\libxerces-c-3.2.3+3\xercesc\util\XMLFloat.cpp(1)
C:\xsd-build\libxsd-msvc-release\libxerces-c-3.2.3+3\xercesc\validators\schema\TraverseSchema.cpp(7687)

I have ever tried to save these files as UTF-16(LE) using Notepad and then
C4819 did not happen. But this is not a regular method.


>
> > 2. config.install.root=C:/xsd     //( not C:\xsd as in the instruction)
>
> Hm, again, this works fine for me and for others. What was the issue
> that made you change this?
>
> On a more general note, it's not very helpful so say "something went
> wrong and I managed to work around it by changing X to Y". Clearly I
> would like to fix this so that the workaround is not necessary but
> you are not providing any information on what actually went wrong.
>
> This problem did not happen when I redo the whole process but I don't know
why.

>
> > Then the c++ code for CityGML 2.0 was generated using the newly built
> > Ver. 4.2.0-b.3. When compiling the generated code using MSVC, it shows
> the
> > error at the generated .hxx files:
> > C1083: 'xsd/cxx/pre.hxx': No such file or directory
> > I searched the xsd folder and cannot find [pre.hxx].
>
> Hm, are they not in C:\xsd\{debug,release}\include\xsd\cxx\ ?
>
>
> Did you perform the steps in 2.3 "Building XSD Runtime Library":
>
>
> https://codesynthesis.com/products/xsd/doc/install-build2.xhtml#windows-libxsd
>
> ?
>
>
> > So I copy the folder xsd, which contains cxx/pre.hxx, from libxsd of Ver.
> > 4.0.4. (I know this is not correct, but I did it for Ver. 4.1 ).
>
> No, this is not going to work: you cannot mix generated code and runtime
> library from different versions. That check and error are there to prevent
> exactly that.
>

I really missed step 2.3.  After redo the whole processes, XSD works. Thank
you again.

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
不含病毒。www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


More information about the xsd-users mailing list