[xsd-users] XSD and VC8 issues
B Hart
bhartsb at gmail.com
Wed Apr 29 04:50:29 EDT 2009
I have a need to use XSD for reading/writing C++ object configuration files
as XML. I am having issues just getting a very simple XML file to read in.
Hopefully someone can help. Here are the steps I've followed:
1. downloaded XSD, installed it, created a very simple xsd schema following
the example in cxx-tree-guide.pdf, and then generated with XSD two files
test.hxx and text.cxx.
2. incorporated test.hxx and test.cxx into a MSVC 2005 (VC 8) built
project. In doing so I included the xercesc include folders, and
xerces-c_3.lib which i located in the XSD distribution. ( Note, I downloaded
xercesc and built it as a static library but then found the xerces-c_3.lib
in the folders that XSD installed to. I noted that the xerces-c_3.lib
provided with the XSD installation is much smaller than the xerces-c_3.lib
that I compiled. I used the XSD version.) I added the appropriate include
and .lib entries in the project properties.
3. I then try to read the simple XML file which was provided in
cxx-tree-guide.pdf. In doing so I get:
Access violation writing location 0x00438830.
Unhandled exception at 0x00414994 in testXML.exe
and break at the following line in the debugger:
auto_ptr(auto_ptr_ref<_Ty> _Right) _THROW0()
{ // construct by assuming pointer from _Right auto_ptr_ref
_Ty **_Pptr = (_Ty **)_Right._Ref;
_Ty *_Ptr = *_Pptr;
break is here---> *_Pptr = 0; // release old
_Myptr = _Ptr; // reset this
}
the DLL is in the folder and I also tried the static lib but got linker
issues.
Some simple instructions for VC8 for doing a test project would be greatly
welcome.
Thanks.
More information about the xsd-users
mailing list