[xsd-users] Linking errors (not Xerces, I believe) with
date_time types in VS2010
Boris Kolpackov
boris at codesynthesis.com
Mon Mar 5 09:40:40 EST 2012
Hi James,
James & Veri Martin <verimart at hotmail.com> writes:
> 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);
You are using the parsing constructor. The only situation that I can
think of that will result in the linker error you've showed is if you
disabled parsing support (--suppress-parsing). Otherwise the constructor
implementation is include into the generated header file.
> 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.
It is normally not used directly, but you can use it if you need to.
> 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);
Yes, that's the constructors that are normally used.
Boris
More information about the xsd-users
mailing list