[xsd-users] Linking errors (not Xerces, I believe) with date_time types in VS2010

James & Veri Martin verimart at hotmail.com
Fri Mar 2 15:19:36 EST 2012


I think this is a problem with the constructor I've use.  I'm trying to construct the date_time types using a constructor that accepts a string followed by a Xerces DOM pointer, a flag, and a cxx::tree::container argument , all of which I'm setting to 0 as follows:

<date_time-type> theVariable(L"2011-09-01T19:40:11Z", 0);

I can't tell from the mapping documentation what this constructor is intended to be used for, but I guess I can't construct a dateTime type with a string representation of the date/time.  Seems like the right thing to do is use one of these constructors instead?

  date_time (int year, unsigned short month, unsigned short day,
             unsigned short hours, unsigned short minutes,
             double seconds);

  date_time (int year, unsigned short month, unsigned short day,
             unsigned short hours, unsigned short minutes,
             double seconds, short zone_hours, short zone_minutes);

James

> To: xsd-users at codesynthesis.com
> Date: Fri, 2 Mar 2012 12:47:10 -0700
> Subject: [xsd-users] Linking errors (not Xerces, I believe) with date_time types in VS2010
> 
> 
> Hello,
> I am setting up xsd usage on a project for the first time.  I followed the Visual Studio 2010 configuration steps and have added the Xerces library to my link path and libs.  However, when I build my project it appears that any schema element typed as xsd:dateTime the generated code for those elements produces this error message:
> error LNK2001: unresolved external symbol "public: __thiscall xsd::cxx::tree::date_time<wchar_t,class xsd::cxx::tree::simple_type<class xsd::cxx::tree::_type> >::date_time<wchar_t,class xsd::cxx::tree::simple_type<class xsd::cxx::tree::_type> >(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xercesc_3_1::DOMElement const *,class xsd::cxx::tree::flags,class xsd::cxx::tree::_type *)" (??0?$date_time at _WV?$simple_type at V_type@tree at cxx@xsd@@@tree at cxx@xsd@@@tree at cxx@xsd@@QAE at ABV?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@PBVDOMElement at xercesc_3_1@@Vflags at 123@PAV_type at 123@@Z)
> 
> ...what am I doing wrong?
> Thanks,James 		 	   		  
 		 	   		  


More information about the xsd-users mailing list