[xsd-users] c++11 linker error unresolved external symbol "...element_map<char, class xsd::cxx::tree::_type>::serialize..."

Boris Kolpackov boris at codesynthesis.com
Fri May 5 07:08:28 EDT 2023


Paul McGrath <paul.s.mcgrath at gmail.com> writes:

> 2>main.obj : error LNK2019: unresolved external symbol "public: static void
> __cdecl xsd::cxx::tree::element_map<char,class
> xsd::cxx::tree::_type>::serialize(class xercesc_3_2::DOMElement &,class
> xsd::cxx::tree::element_type<char,class xsd::cxx::tree::_type> const &)"

This function is defined in

<xsd/cxx/tree/serialization/element-map.txx>

Which should be included by the generated header file corresponding
to your schema, provided it's compiled with --generate-element-map
and --generate-serialization. Can you check that (a) this header is
indeed included in the generated header and (b) you include this
generated header in the translation unit where you call this function.

For instance, in the messaging example, this header is included in
the generated protocol.hxx which in turn is included by driver.cxx
which calls the function.



More information about the xsd-users mailing list