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 Paul Rivera <pa...@yahoo.com> on 2004/12/22 17:15:58 UTC
XMemory and MFC
Hi! My application is having compilation errors due to
the XMemory.cpp and XMemory.hpp. I'm using
xerces-c++-2.4.0. I've gone through a couple of posts
and found out that it was due to the preprocessor
directive visual studio uses with debug mode:
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
Has this been fixed in xerces-c++-2.6.0? If yes,
maybe I could just download it. Else, can you tell me
how to fix this? If its a patch file, I have a couple
of questions.
1.) do I run it with "patch -p2 < patchfile"?
2.) Should I do it in the directory where my src
folder is located?
3.) patchfiles usually have something like
/home/cvspublic/xml-xerces/c/src/xercesc/util/
prefixed in the file to be patched. My directory
structure is not like that. Xerces is in
c:\xerces-c-src2_4_0. Is it ok?
by the way, i'm using visual studio .net 2003 on
windows xp pro.
thanks!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.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: XMemory and MFC
Posted by Matthew Berry <ma...@apt.com>.
Paul,
As Alberto has already pointed out DEBUG_NEW doesn't work with the placement
new.
I'm have been using Xerces 2.3 with the DEBUG_NEW macro technique and
everything compiles fine. I always include the Xerces headers before the
#define, so that there pre-processor does not attempt to fudge the Xerces
stuff.
Good luck.
-----Original Message-----
From: Paul Rivera [mailto:paul_mrivera@yahoo.com]
Sent: 24 December 2004 09:29
To: xerces-c-dev@xml.apache.org
Subject: Re: XMemory and MFC
Thanks for replying. I commented out the "#define new
DEBUG_NEW". I'm still getting the same compile
errors. Is xerces-2.6.0 supposed to work with mfc
out-of-the-box? Has anyone tried it?
--- Alberto Massari <am...@progress.com> wrote:
> Hi Paul,
> have you tried removing the "#define new DEBUG_NEW"
> definition? When that
> macro is enable, all attempts to use a placement new
> will fail (regardless
> if Xerces is involved or not)
>
> Alberto
>
> At 22.06 22/12/2004 -0800, Paul Rivera wrote:
> >I compiled it with xerces-c-2.6.0 and I'm still
> >getting errors from XMemory.hpp. Some of the lines
> >which Visual Studio points out are:
> >
> >void* operator new(size_t size);
> >void* operator new(size_t size, const char* file,
> int
> >line);
> >void operator delete(void* p, const char* file, int
> >line);
> >void* operator new(size_t size, MemoryManager*
> >memMgr);
> >void operator delete(void* p);
> >
> >any ideas? Are there patches for this? If yes,
> can
> >you tell me where to get them?
> >
> >--- Gareth Reakes <ga...@parthenoncomputing.com>
> >wrote:
> >
> > > Hey,
> > >
> > > >
> > > > Has this been fixed in xerces-c++-2.6.0? If
> yes,
> > > > maybe I could just download it.
> > >
> > > Yes, and there have been lots of other
> improvements,
> > > if you can,
> > > download it.
> > >
> > >
> > > > Else, can you tell me
> > > > how to fix this? If its a patch file, I have
> a
> > > couple
> > > > of questions.
> > > >
> > > > 1.) do I run it with "patch -p2 < patchfile"?
> > >
> > > Depends on how much of the path from he patch
> you
> > > want to ignore. The
> > > man page is quite good, if you need more info
> mail
> > > again.
> > >
> > > > 2.) Should I do it in the directory where my
> src
> > > > folder is located?
> > > > 3.) patchfiles usually have something like
> > > > /home/cvspublic/xml-xerces/c/src/xercesc/util/
> > > > prefixed in the file to be patched. My
> directory
> > > > structure is not like that. Xerces is in
> > > > c:\xerces-c-src2_4_0. Is it ok?
> > >
> > >
> > > Yes, its OK, it means you have to change -p
> option
> > > to only take account
> > > of the section of section of the path that is
> the
> > > same.
> > >
> > >
> > > Gareth
> > >
> > > --
> > > Gareth Reakes, Managing Director Parthenon
> > > Computing
> > > +44-1865-811184
> > > http://www.parthcomp.com
> > >
> > >
>
>---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail:
> > > xerces-c-dev-help@xml.apache.org
> > >
> > >
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Mail - 250MB free storage. Do more. Manage
> less.
> >http://info.mail.yahoo.com/mail_250
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> xerces-c-dev-unsubscribe@xml.apache.org
> >For additional commands, e-mail:
> xerces-c-dev-help@xml.apache.org
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> xerces-c-dev-help@xml.apache.org
>
>
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.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
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: XMemory and MFC
Posted by Paul Rivera <pa...@yahoo.com>.
Thanks for replying. I commented out the "#define new
DEBUG_NEW". I'm still getting the same compile
errors. Is xerces-2.6.0 supposed to work with mfc
out-of-the-box? Has anyone tried it?
--- Alberto Massari <am...@progress.com> wrote:
> Hi Paul,
> have you tried removing the "#define new DEBUG_NEW"
> definition? When that
> macro is enable, all attempts to use a placement new
> will fail (regardless
> if Xerces is involved or not)
>
> Alberto
>
> At 22.06 22/12/2004 -0800, Paul Rivera wrote:
> >I compiled it with xerces-c-2.6.0 and I'm still
> >getting errors from XMemory.hpp. Some of the lines
> >which Visual Studio points out are:
> >
> >void* operator new(size_t size);
> >void* operator new(size_t size, const char* file,
> int
> >line);
> >void operator delete(void* p, const char* file, int
> >line);
> >void* operator new(size_t size, MemoryManager*
> >memMgr);
> >void operator delete(void* p);
> >
> >any ideas? Are there patches for this? If yes,
> can
> >you tell me where to get them?
> >
> >--- Gareth Reakes <ga...@parthenoncomputing.com>
> >wrote:
> >
> > > Hey,
> > >
> > > >
> > > > Has this been fixed in xerces-c++-2.6.0? If
> yes,
> > > > maybe I could just download it.
> > >
> > > Yes, and there have been lots of other
> improvements,
> > > if you can,
> > > download it.
> > >
> > >
> > > > Else, can you tell me
> > > > how to fix this? If its a patch file, I have
> a
> > > couple
> > > > of questions.
> > > >
> > > > 1.) do I run it with "patch -p2 < patchfile"?
> > >
> > > Depends on how much of the path from he patch
> you
> > > want to ignore. The
> > > man page is quite good, if you need more info
> mail
> > > again.
> > >
> > > > 2.) Should I do it in the directory where my
> src
> > > > folder is located?
> > > > 3.) patchfiles usually have something like
> > > > /home/cvspublic/xml-xerces/c/src/xercesc/util/
> > > > prefixed in the file to be patched. My
> directory
> > > > structure is not like that. Xerces is in
> > > > c:\xerces-c-src2_4_0. Is it ok?
> > >
> > >
> > > Yes, its OK, it means you have to change -p
> option
> > > to only take account
> > > of the section of section of the path that is
> the
> > > same.
> > >
> > >
> > > Gareth
> > >
> > > --
> > > Gareth Reakes, Managing Director Parthenon
> > > Computing
> > > +44-1865-811184
> > > http://www.parthcomp.com
> > >
> > >
>
>---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail:
> > > xerces-c-dev-help@xml.apache.org
> > >
> > >
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Mail - 250MB free storage. Do more. Manage
> less.
> >http://info.mail.yahoo.com/mail_250
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> xerces-c-dev-unsubscribe@xml.apache.org
> >For additional commands, e-mail:
> xerces-c-dev-help@xml.apache.org
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> xerces-c-dev-help@xml.apache.org
>
>
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.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: XMemory and MFC
Posted by Alberto Massari <am...@progress.com>.
Hi Paul,
have you tried removing the "#define new DEBUG_NEW" definition? When that
macro is enable, all attempts to use a placement new will fail (regardless
if Xerces is involved or not)
Alberto
At 22.06 22/12/2004 -0800, Paul Rivera wrote:
>I compiled it with xerces-c-2.6.0 and I'm still
>getting errors from XMemory.hpp. Some of the lines
>which Visual Studio points out are:
>
>void* operator new(size_t size);
>void* operator new(size_t size, const char* file, int
>line);
>void operator delete(void* p, const char* file, int
>line);
>void* operator new(size_t size, MemoryManager*
>memMgr);
>void operator delete(void* p);
>
>any ideas? Are there patches for this? If yes, can
>you tell me where to get them?
>
>--- Gareth Reakes <ga...@parthenoncomputing.com>
>wrote:
>
> > Hey,
> >
> > >
> > > Has this been fixed in xerces-c++-2.6.0? If yes,
> > > maybe I could just download it.
> >
> > Yes, and there have been lots of other improvements,
> > if you can,
> > download it.
> >
> >
> > > Else, can you tell me
> > > how to fix this? If its a patch file, I have a
> > couple
> > > of questions.
> > >
> > > 1.) do I run it with "patch -p2 < patchfile"?
> >
> > Depends on how much of the path from he patch you
> > want to ignore. The
> > man page is quite good, if you need more info mail
> > again.
> >
> > > 2.) Should I do it in the directory where my src
> > > folder is located?
> > > 3.) patchfiles usually have something like
> > > /home/cvspublic/xml-xerces/c/src/xercesc/util/
> > > prefixed in the file to be patched. My directory
> > > structure is not like that. Xerces is in
> > > c:\xerces-c-src2_4_0. Is it ok?
> >
> >
> > Yes, its OK, it means you have to change -p option
> > to only take account
> > of the section of section of the path that is the
> > same.
> >
> >
> > Gareth
> >
> > --
> > Gareth Reakes, Managing Director Parthenon
> > Computing
> > +44-1865-811184
> > http://www.parthcomp.com
> >
> >
>---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> > xerces-c-dev-help@xml.apache.org
> >
> >
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail - 250MB free storage. Do more. Manage less.
>http://info.mail.yahoo.com/mail_250
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: XMemory and MFC
Posted by Paul Rivera <pa...@yahoo.com>.
I compiled it with xerces-c-2.6.0 and I'm still
getting errors from XMemory.hpp. Some of the lines
which Visual Studio points out are:
void* operator new(size_t size);
void* operator new(size_t size, const char* file, int
line);
void operator delete(void* p, const char* file, int
line);
void* operator new(size_t size, MemoryManager*
memMgr);
void operator delete(void* p);
any ideas? Are there patches for this? If yes, can
you tell me where to get them?
--- Gareth Reakes <ga...@parthenoncomputing.com>
wrote:
> Hey,
>
> >
> > Has this been fixed in xerces-c++-2.6.0? If yes,
> > maybe I could just download it.
>
> Yes, and there have been lots of other improvements,
> if you can,
> download it.
>
>
> > Else, can you tell me
> > how to fix this? If its a patch file, I have a
> couple
> > of questions.
> >
> > 1.) do I run it with "patch -p2 < patchfile"?
>
> Depends on how much of the path from he patch you
> want to ignore. The
> man page is quite good, if you need more info mail
> again.
>
> > 2.) Should I do it in the directory where my src
> > folder is located?
> > 3.) patchfiles usually have something like
> > /home/cvspublic/xml-xerces/c/src/xercesc/util/
> > prefixed in the file to be patched. My directory
> > structure is not like that. Xerces is in
> > c:\xerces-c-src2_4_0. Is it ok?
>
>
> Yes, its OK, it means you have to change -p option
> to only take account
> of the section of section of the path that is the
> same.
>
>
> Gareth
>
> --
> Gareth Reakes, Managing Director Parthenon
> Computing
> +44-1865-811184
> http://www.parthcomp.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> xerces-c-dev-help@xml.apache.org
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: XMemory and MFC
Posted by Gareth Reakes <ga...@parthenoncomputing.com>.
Hey,
>
> Has this been fixed in xerces-c++-2.6.0? If yes,
> maybe I could just download it.
Yes, and there have been lots of other improvements, if you can,
download it.
> Else, can you tell me
> how to fix this? If its a patch file, I have a couple
> of questions.
>
> 1.) do I run it with "patch -p2 < patchfile"?
Depends on how much of the path from he patch you want to ignore. The
man page is quite good, if you need more info mail again.
> 2.) Should I do it in the directory where my src
> folder is located?
> 3.) patchfiles usually have something like
> /home/cvspublic/xml-xerces/c/src/xercesc/util/
> prefixed in the file to be patched. My directory
> structure is not like that. Xerces is in
> c:\xerces-c-src2_4_0. Is it ok?
Yes, its OK, it means you have to change -p option to only take account
of the section of section of the path that is the same.
Gareth
--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org