[xsd-users] Re: Struggling with CityGML 2.0.0 parsing
Boris Kolpackov
boris at codesynthesis.com
Tue Feb 26 04:21:53 EST 2013
Hi Olivier,
Olivier Tournaire <olitour at gmail.com> writes:
> I finally managed to make my simple test program work. I had tu use
> references, and all work like a charm:
Glad you figured it out. I just couldn't bring myself to point out
the same mistake probably a hundredth time. Note that you are still
leaking memory with your (unnecessary) _clone() calls. Just cast the
object itself instead of its copy:
if (const BuildingType* b = dynamic_cast<const BuildingType*> (&af))
> --export-symbol GML_DLL_DEF
> --hxx-prologue #include "gml_dll_def.hpp"
>
> where gml_dll_def.hpp is classically:
>
> #ifndef __GML_DLL_DEF_HPP__
> #define __GML_DLL_DEF_HPP__
>
> [...]
>
> #endif // __GMLL_DLL_DEF_HPP__
>
> Of course, these options are added for each dll.
You ave a separate file like this for each DLL, right?
> I also add to use the /FORCE:MULTIPLE option in VC++2010 to prevent
> link errors on "already defined symbol ...".
That shouldn't be necessary. There must be something wrong with your
export setup.
> Could you please give me some hint on how to solve this issue? It is a real
> problem, and I do not understand how to properly use --export-xml-schema.
This thread has step-by-step instructions:
http://www.codesynthesis.com/pipermail/xsd-users/2010-September/003011.html
> Note that my project contains 5 DLLs:
> * xlink
> * smil
> * xAL
> * gml
> * citygml
>
> Dependencies are as follow:
> * gml depends on xlink and smil
> * citygml depends on gml and xAL
Do you really need all these DLLs? GML/CityGML is already complex enough.
Trying to package all the components into separate DLLs on Windows is just
looking for trouble, IMO. So if I were you, I would just put everything in
a single DLL (or even link it directly to the executable). Keep it simple.
If you still want all the DLLs, then to work around the std::basic_string
issue, you will need to create yet another, "root" DLL on which all other
DLLs will depend and which will contain the xml-schema.hxx (see the link
above for details).
Boris
More information about the xsd-users
mailing list