[xsd-users] Compiling GML/CityGML (was: First question)
jaume.faus at vianova.no
jaume.faus at vianova.no
Tue Feb 10 05:02:31 EST 2009
Hi Jaume,
jaume.faus at vianova.no <jaume.faus at vianova.no> writes:
> But it also happens that there are some refactoring proposals for our
> object model and we are studing GML, CityGML, IFCxml and plain IFC to
> extract ideas from them for the new model. In this case I'd like to have
> an initial tool that let me study these standards in depth and I found
> these automatic parser generator tools a good help to save me the time
to
> writing the parsers rather than concentrate in the model beneath. If
after
> all we decide to keep our model then it is no strict need for having a
GML
> model and we probably would discard it because of its size.
While using C++/Tree may not be the optimal solution, it would
definitely be the simplest from the development point of view
unless your custom object model corresponds very closely to
GML/CityGML.
With C++/Parser you have to process data in the GML/CityGML order.
With C++/Tree you have all of the data available to you so you can
convert it in the most convenient way.
> I've seen that object files created by the parser are of about
> 100MB. That is a considerable footprint.
The GML schema is quite large so the non-trivial footprint is
expected. Having said that, I just build the CityGML test I
mentioned earlier (contains both GML and CityGML schemas) with
optimization on my 64-bit GNU/Linux box. After stripping, the
driver executable is about 5MB. I am not sure where you have
got 100MB.
Well I've just create a new VS2005 project, added all the schemas in the
resources folder, then selected the --generate-polymorphic option for each
of them and compile. Since I having linking errors like the following
1>Linking...
1>mfcs80ud.lib(dllmodul.obj) : error LNK2005: _DllMain at 12 already defined
in MSVCRTD.lib(dllmain.obj)
1> Creating library C:\GML2\Debug\GML2.lib and object
C:\GML2\Debug\GML2.exp
1>units.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_0::PanicHandler * const,class
xercesc_3_0::MemoryManager * const)"
(__imp_?Initialize at XMLPlatformUtils@xercesc_3_0@@SAXQBD0QAVPanicHandler at 2@QAVMemoryManager at 2@@Z)
1>valueObjects.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_0::PanicHandler * const,class
xercesc_3_0::MemoryManager * const)"
(__imp_?Initialize at XMLPlatformUtils@xercesc_3_0@@SAXQBD0QAVPanicHandler at 2@QAVMemoryManager at 2@@Z)
1>temporal.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_0::PanicHandler * const,class
xercesc_3_0::MemoryManager * const)"
(__imp_?Initialize at XMLPlatformUtils@xercesc_3_0@@SAXQBD0QAVPanicHandler at 2@QAVMemoryManager at 2@@Z)
1>temporalReferenceSystems.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_0::PanicHandler * const,class
xercesc_3_0::MemoryManager * const)"
(__imp_?Initialize at XMLPlatformUtils@xercesc_3_0@@SAXQBD0QAVPanicHandler at 2@QAVMemoryManager at 2@@Z)
referenced in function "class std::auto_ptr<class
gml::AbstractTimeReferenceSystemType> __cdecl
gml::_TimeReferenceSystem(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,class
xsd::cxx::tree::flags,class xsd::cxx::tree::properties<char> const &)"
(?_TimeReferenceSystem at gml@@YA?AV?$auto_ptr at VAbstractTimeReferenceSystemType@gml@@@std@@ABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@3 at Vflags@tree at cxx@xsd@@ABV?$properties at D@678@@Z)
1>temporalTopology.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_0::PanicHandler * const,class
xercesc_3_0::MemoryManager * const)"
(__imp_?Initialize at XMLPlatformUtils@xercesc_3_0@@SAXQBD0QAVPanicHandler at 2@QAVMemoryManager at 2@@Z)
1>topology.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_0::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_0::PanicHandler * const,class
xercesc_3_0::MemoryManager * const)"
(__imp_?Initialize at XMLPlatformUtils@xercesc_3_0@@SAXQBD0QAVPanicHandler at 2@QAVMemoryManager at 2@@Z)
Then I guessed that I'm missing the xerces library to the linkage. So I
added it to the Project->properties->Configuration
properties->Linker->Additional Dependencies. In my computer this is the
path to what I guess is the missing dependency:
"C:\Program Files\CodeSynthesis XSD 3.2\lib\vc-8.0\xerces-c_3.lib"
Getting these output
1>------ Build started: Project: GML2, Configuration: Release Win32 ------
1>Linking...
1>mfcs80u.lib(dllmodul.obj) : error LNK2005: _DllMain at 12 already defined
in MSVCRT.lib(dllmain.obj)
1> Creating library C:\GML2\Release\GML2.lib and object
C:\GML2\Release\GML2.exp
1>C:\GML2\Release\GML2.dll : fatal error LNK1169: one or more multiply
defined symbols found
1>Build log was saved at "file://c:\GML2\GML2\Release\BuildLog.htm"
1>GML2 - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========
Here is where I got lost and I couldn't build the dll despite I have been
googling a lot since yesterday. It looks that my supposition was not true.
So I don't really know how big is the resulting dll, but I've got a look
to the obj files and yes, they are 110MB.
It would be so helpful if someone knows what I'm doing wrong.
>From now, Thanks a lot!
Jaume
More information about the xsd-users
mailing list