From boris at codesynthesis.com Fri May 5 07:08:28 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri May 5 07:00:09 2023 Subject: [xsd-users] c++11 linker error unresolved external symbol "...element_map::serialize..." In-Reply-To: References: Message-ID: Paul McGrath writes: > 2>main.obj : error LNK2019: unresolved external symbol "public: static void > __cdecl xsd::cxx::tree::element_map xsd::cxx::tree::_type>::serialize(class xercesc_3_2::DOMElement &,class > xsd::cxx::tree::element_type const &)" This function is defined in 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. From paul.s.mcgrath at gmail.com Fri May 5 10:57:30 2023 From: paul.s.mcgrath at gmail.com (Paul McGrath) Date: Mon May 8 09:18:02 2023 Subject: [xsd-users] c++11 linker error unresolved external symbol "...element_map::serialize..." In-Reply-To: References: Message-ID: Thanks for the help. It solved the problem once I got the right combination of flags. Best regards, Paul On Fri, May 5, 2023 at 7:08?AM Boris Kolpackov wrote: > Paul McGrath writes: > > > 2>main.obj : error LNK2019: unresolved external symbol "public: static > void > > __cdecl xsd::cxx::tree::element_map > xsd::cxx::tree::_type>::serialize(class xercesc_3_2::DOMElement &,class > > xsd::cxx::tree::element_type const &)" > > This function is defined in > > > > 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. >