You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Volk, Virginia" <vi...@boeing.com> on 2003/06/26 23:32:43 UTC

Running xerces from VS .net 2003 / XMLString::transcode delete

Hello-

I am running on Windows XP. We recently upgraded our development environment to VS .net 2003. Since we upgraded, I have been having a problem where a debug assert occurs when we delete a string created by XMLString::transcode. I noticed a note about this on http://xml.apache.org/xerces-c/faq-build.html#faq-12 . I see the problem in xerces 1.6 and in xerces 2.3 (I upgraded trying to solve the problem.)

1) Why did this used to work and why does it not work any more?

2) For for strings created by XMLString::transcode I can deallocate them using XMLString::release as suggested in the link above, however I have the same debug assert with the delete of an SAX2XMLREADER created by XMLReaderFactory::createXMLReader, and that has no release method for me to switch to.  createXMLReader's comment even says I'm supposed to delete it myself.

3) Is the problem really because xerces-c comes with a VS .net 2002 xerces-all.sln (solution) file with which to compile it, and my code is using vs .net 2003? So I am calling a vs02 created dll from a vs03 created dll. I then tried to upgrade the xerces-all.sln file to a VS .net 2003 .sln. But when I compile it I get loads of errors. Here is just the start of 102 errors I get when I compile XercesLib in vs .net 2003:

..\..\..\..\..\src\xercesc\validators\common\CMLeaf.hpp(143) : error C2226: syntax error : unexpected type 'xercesc_2_3::QName'
..\..\..\..\..\src\xercesc\validators\common\CMLeaf.hpp(143) : error C2238: unexpected token(s) preceding ';'
..\..\..\..\..\src\xercesc\validators\common\CMLeaf.hpp(212) : error C2511: 'xercesc_2_3::CMLeaf::CMLeaf(xercesc_2_3::QName *const ,const unsigned int,xercesc_2_3::MemoryManager *const )' : overloaded member function not found in 'xercesc_2_3::CMLeaf'
..\..\..\..\..\src\xercesc\validators\common\CMLeaf.hpp(136) : see declaration of 'xercesc_2_3::CMLeaf'

4) As an interesting side note, when I did compile the xerces-all.sln in VS .net 2002 that came with the source code   it would not link with out unresolved externals until I commented out the unimplemented copy constructor of XMemory in XMemory.hpp

Thank you, I would really appreciate any suggestions.
Virginia

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Errors while Building xerces on Solaris using GCC

Posted by Satish Medepalli <sa...@yahoo.com>.
Hello,

   I am trying to build xerces-c 2.3.0 on Solaris-2.7 (SunOS 5.8) using
GCC-2.95.3, but was having some errors. I am very new to xerces and would
really appreciate any help with this..

This is what i have done to build it-

while running the runConfigure scripts I gave the following gcc flags..

runConfigure -psolaris -cgcc -xg++ -minmem -nsocket -tnative -rpthread

after that when i made "gmake" i have following errors..



Building /home/medepasv/xerces-c-src_2_3_0/lib/libxerces-c.so.23.0
gmake -C /home/medepasv/xerces-c-src_2_3_0/obj/SOLARIS/.. -k
gmake[1]: Entering directory `/home/medepasv/xerces-c-src_2_3_0/obj'
Building /home/medepasv/xerces-c-src_2_3_0/lib/libxerces-c.so.23.0
g++ -DSOLARIS -shared  -h libxerces-c.so.23 -o
/home/medepasv/xerces-c-src_2_3_0/lib/libxerces-c.so.23.0
SOLARIS/ASCIIRangeFactory.o SOLARIS/AbstractDOMParser.$
Text relocation remains referenced against symbol offset  in file
<unknown>                           0xac8      
/opt/gnu/compilers/5.8/gcc-2.95.3/lib/gcc-lib/sparc-sun
solaris2.8/2.95.3/libstdc++.a(iovfscanf.o)

<unknown>                           0xacc      
/opt/gnu/compilers/5.8/gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstdc++.a(iovfscanf.o)

and a series of this followed.. if anyone can give me some solution to
this it would really help.

Thanks,
Satish



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Running xerces from VS .net 2003 / XMLString::transcode delete

Posted by da...@us.ibm.com.



> Hello-

> I am running on Windows XP. We recently upgraded our development
environment
> to VS .net 2003. Since we upgraded, I have been having a problem where a
debug
> assert occurs when we delete a string created by XMLString::transcode. I
noticed a
> note about this on http://xml.apache.org/xerces-c/faq-build.html#faq-12 .
I see the
> problem in xerces 1.6 and in xerces 2.3 (I upgraded trying to solve the
problem.)
>
> 1) Why did this used to work and why does it not work any more?

Did you rebuild Xerces-C using VS .net 2003? If not, you should, or else
there will be two memory heaps, and you will get all sorts of problems.

> 2) For for strings created by XMLString::transcode I can deallocate them
using
> XMLString::release as suggested in the link above, however I have the
same debug
> assert with the delete of an SAX2XMLREADER created by
XMLReaderFactory::createXMLReader,
> and that has no release method for me to switch to.  createXMLReader's
comment even
> says I'm supposed to delete it myself.

That's why the XMLString::release() is just a stop-gap.  It doesn't really
solve all of the problems with having separate heaps.

> 3) Is the problem really because xerces-c comes with a VS .net 2002
xerces-all.sln
> (solution) file with which to compile it, and my code is using vs .net
2003? So I am
> calling a vs02 created dll from a vs03 created dll.

Yes, that's the problem.  Each uses a different version of the runtime, so
each has its own heap.

> 4) As an interesting side note, when I did compile the xerces-all.sln in
VS .net 2002
> that came with the source code   it would not link with out unresolved
externals until
> I commented out the unimplemented copy constructor of XMemory in
XMemory.hpp

I think these compilations problems are fixed in the latest CVS code.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org