[xsd-users] (Windows) mixing debug/release Xerces lib
Greg Carter
greg at permedia.ca
Mon Feb 23 12:07:34 EST 2009
Hello,
We have an application that has a plug-in interface, where each plug-in
is a separate dll on windows. We use XML extensively in the interface.
It is conceivable that a 3rd party developing a plug-in will be using
XSD/xerces. We designed the interface so that all new/delete of
exported objects occurs within the plug-in dll. This way it doesn't
matter if the plug-in is debug while the application calling the plug-in
is built in release mode. However I have noticed that if the plug-in
uses a different xerces lib (xerces-c_3_0D.dll vs xerces-c_3_0.dll) then
in the parse routine for an XML type we get an access violation. If I
switch the debug plug-in dll build to use xerces-c_3_0.dll, all is
fine. Reading the xerces faq I found:
http://xerces.apache.org/xerces-c/faq-build-2.html#faq-13
Is XSD generated code calling delete[] directly on the strings allocated
by the xerces parser? Or is this another problem? If it is indeed
calling delete[] directly, could it call XMLString::release() instead?
According to the faq that would fix the problem. This isn't that big of
a problem for us since I don't foresee us or our users debugging xerces
code, but it would be one less thing to worry about.
Thanks.
Greg.
More information about the xsd-users
mailing list