[xsd-users] exporting symbols from a windows dll

Angelo Difino angelo at smartrm.com
Tue Aug 24 05:58:13 EDT 2010


Dear Boris and all,
i'm having some difficulties on a win32 platform (7), with 3.3 version 
of xsd, trying to exporting the symbols for a generated
dll (i use visual studio 9.0 to compile and i create the c++ class by 
command line).

The schema i use are available for download at 
http://www.mxb.it/enigmahc/mxm.zip

The myexport.hxx includes my export definition. I've also added the 
preprocessor info "MXM_EXPORTS".

If i don't export any simbols i got no trouble.

If i export the symbols I can create the c++ class, but when i try to 
compile i found a lot of this kind of error:

1>VideoType.cxx
1>..\..\..\xsd-3.3.0-i686-windows\libxsd\xsd/cxx/tree/containers.txx(180) : 
error C2027: use of undefined type 
'mxm_dataobject::mpeg7smp::CreationInformationType'
1>        
d:\workspace\smartrm\mxm-cpp\src\mxm_dataobject\SegmentType.hxx(93) : 
see declaration of 'mxm_dataobject::mpeg7smp::CreationInformationType'
1>        
..\..\..\xsd-3.3.0-i686-windows\libxsd\xsd/cxx/tree/containers.txx(176) 
: while compiling class template member function 'void 
xsd::cxx::tree::optional<T>::set(const T &)'
1>        with
1>        [
1>            
T=mxm_dataobject::mpeg7smp::SegmentType::CreationInformation_type
1>        ]
1>        
..\..\..\xsd-3.3.0-i686-windows\libxsd\xsd/cxx/tree/containers.txx(161) 
: while compiling class template member function 
'xsd::cxx::tree::optional<T> &xsd::cxx::tree::optional<T>::operator 
=(const xsd::cxx::tree::optional<T> &)'
1>        with
1>        [
1>            
T=mxm_dataobject::mpeg7smp::SegmentType::CreationInformation_type
1>        ]
1>        
d:\workspace\smartrm\mxm-cpp\src\mxm_dataobject\SegmentType.hxx(179) : 
see reference to class template instantiation 
'xsd::cxx::tree::optional<T>' being compiled
1>        with
1>        [
1>            
T=mxm_dataobject::mpeg7smp::SegmentType::CreationInformation_type
1>        ]
1>..\..\..\xsd-3.3.0-i686-windows\libxsd\xsd/cxx/tree/containers.txx(180) : 
error C2228: left of '._clone' must have class/struct/union
1>..\..\..\xsd-3.3.0-i686-windows\libxsd\xsd/cxx/tree/containers.txx(180) : 
fatal error C1903: unable to recover from previous error(s); stopping 
compilation

the command line is:

|1) xsd cxx-tree --generate-xml-schema --generate-serialization 
--generate-polymorphic xmlschema.xsd

2) xsd cxx-tree --hxx-prologue "#include \"myexport.hxx\"" 
--export-symbol MXM_SYMBOL_DECL --generate-wildcard --extern-xml-schema 
xmlschema.hxx --generate-serialization --generate-polymorphic 
--file-per-type --namespace-map 
urn:mpeg:mpeg-m:schema:storelicenseprotocol:2010=mxm_dataobject::mxm_slp 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/bbl.xsd=bbl.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/mxmalp.xsd=mxmalp.xsd --location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2010/04/mxmbp.xsd=mxmbp.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/dia.xsd=dia.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/erl.xsd=erl.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/didl-msx.xsd=didl-msx.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/didl.xsd=didl.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/didmodel.xsd=didmodel.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/dii.xsd=dii.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/ipmpdidl.xsd=ipmpdidl.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/ipmpinfo-msx.xsd=ipmpinfo-msx.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/ipmpinfo.xsd=ipmpinfo.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2010/04/mxmidp.xsd=mxmidp.xsd --location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/ipmpmsg.xsd=ipmpmsg.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/mpeg4ipmp.xsd=mpeg4ipmp.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/mpeg7smp.xsd=mpeg7smp.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/rel-m1x.xsd=rel-m1x.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/rel-m2x.xsd=rel-m2x.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/rel-m3x.xsd=rel-m3x.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/rel-mx.xsd=rel-mx.xsd --location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/rel-r.xsd=rel-r.xsd 
--location-map 
http://mxm.wg11.sc29.org/wp-content/uploads/2009/12/rel-sx.xsd=rel-sx.xsd --location-map 
http://www.w3.org/2001/xml.xsd=xml.xsd --location-map 
http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd=dsig.xsd 
--location-map 
http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd=xenc.xsd 
--namespace-map 
urn:mpeg:maf:schema:mediastreaming:DIDLextensions=mxm_dataobject::didl_msx 
--namespace-map urn:mpeg:mpeg21:2006:07-DIDL-NS=mxm_dataobject::didl 
--namespace-map 
urn:mpeg:mpeg21:2002:02-DIDMODEL-NS=mxm_dataobject::didmodel 
--namespace-map urn:mpeg:mpeg21:2002:01-DII-NS=mxm_dataobject::dii 
--namespace-map 
urn:mpeg:mpeg21:2004:01-IPMPDIDL-NS=mxm_dataobject::ipmpdidl 
--namespace-map urn:mpeg:mpeg21:2003:01-DIA-NS=mxm_dataobject::dia 
--namespace-map urn:mpeg:mpeg21:2005:01-ERL-NS=mxm_dataobject::erl 
--namespace-map 
urn:mpeg:maf:Schema:mediastreaming:IPMPINFOextensions:2007=mxm_dataobject::ipmpinfo_msx 
--namespace-map 
urn:mpeg:mpeg21:2004:01-IPMPINFO-NS=mxm_dataobject::ipmpinfo 
--namespace-map 
urn:mpeg:mpegB:schema:IPMP-XML-MESSAGES:2007=mxm_dataobject::ipmpmsg 
--namespace-map urn:mpeg:mpeg4:IPMPSchema:2002=mxm_dataobject::mpeg4ipmp 
--namespace-map urn:mpeg:mpeg7:smp:schema:2001=mxm_dataobject::mpeg7smp 
--namespace-map 
urn:mpeg:mpeg21:2005:01-REL-M1X-NS=mxm_dataobject::rel_m1x 
--namespace-map 
urn:mpeg:mpeg21:2006:01-REL-M2X-NS=mxm_dataobject::rel_m2x 
--namespace-map 
urn:mpeg:mpeg21:2006:01-REL-M3X-NS=mxm_dataobject::rel_m3x 
--namespace-map urn:mpeg:mpeg21:2003:01-REL-MX-NS=mxm_dataobject::rel_mx 
--namespace-map urn:mpeg:mpeg21:2003:01-REL-R-NS=mxm_dataobject::rel_r 
--namespace-map urn:mpeg:mpeg21:2003:01-REL-SX-NS=mxm_dataobject::rel_sx 
--namespace-map http://www.w3.org/XML/1998/namespace=mxm_dataobject::xml 
--namespace-map http://www.w3.org/2000/09/xmldsig#=mxm_dataobject::dsig 
--namespace-map http://www.w3.org/2001/04/xmlenc#=mxm_dataobject::xenc 
--namespace-map 
urn:mpeg:mpeg-m:schema:accesslicenseprotocol:2010=mxm_dataobject::mxm_alp --namespace-map 
urn:mpeg:mpeg-m:schema:baseprotocol:2010=mxm_dataobject::mxm_bprotocols 
--namespace-map 
urn:mpeg:mpeg-m:schema:identifycontentprotocol:2010=mxm_dataobject::mxm_icp 
--namespace-map 
urn:mpeg:mpeg-m:schema:identifydeviceprotocol:2010=mxm_dataobject::mxm_idp 
--namespace-map 
urn:mpeg:mpeg-m:schema:verifydeviceprotocol:2010=mxm_dataobject::mxm_vdp 
didl.xsd

thank you very much for the support,
best,
Angelo
|


More information about the xsd-users mailing list