You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Andrew <ju...@yahoo.com> on 2004/04/13 14:45:11 UTC
Compilation error w.r.t. XSEC_DECLARE_XERCES_CLASS macro
Good day,
I have never come across this problem before and I am not sure how to go about
fixing it. So any assisstance would be greatly appreciated.
I am working under VS .Net
I have one project file building a DLL which links in Xerces,XSec etc. with no
problem.
I have another exe project that is linking in the lib created from the above
dll.
I am #include'ing an .h file from the DLL project in my .exe project.
This results in a chain of #include's to XSec class that raise the following
compilation error (or variation of this error w.r.t. different files).
\xsec\dsig\DSIGTransform.hpp(80) : error C2874: using-declaration causes a
multiple declaration of 'xercesc_2_4::DOMDocument'
\Xerces\include\xercesc\dom\DOMDocument.hpp(103) : see declaration
of 'xercesc_2_4::DOMDocument'
The DSIGTranform uses XSEC_DECLARE_XERCES_CLASS macro to forward declare the
DOMDocument class, which is later defined by DOMDocument itself.
None of the other classes such as DOMNode that are forward declared cause any
problems, just DOMDocument.
I've attempted to unwind the #include order to see if that turned up anything,
but it hasn't.
I'll include the def'n of the macro here for completeness:
#define XSEC_DECLARE_XERCES_CLASS(NAME) namespace XERCES_CPP_NAMESPACE { class
NAME; } using XERCES_CPP_NAMESPACE::NAME
Thanks in advance for any help you could provide
Andrew
OUT OF MEMORY Exception, is it posible to sing a big XML ????
Posted by Martin Labarthe Dubois <du...@consist.com.ar>.
Hello,
I need to sign a bigXML (aprox. 8900 KB), but I receive an OutOfMemory
Exception,
i set the JVM -Xmx to
-Xmx1024m
but I still receive the error, is there a way to avoid this problem???
Thanks,
Martin
Re: Compilation error w.r.t. XSEC_DECLARE_XERCES_CLASS macro
Posted by Berin Lautenbach <be...@wingsofhermes.org>.
Andrew,
My guess is you are using version 1.0?
Version 1.1 now has the following definition :
#define XSEC_DECLARE_XERCES_CLASS(NAME) namespace XERCES_CPP_NAMESPACE {
class NAME; }
I.e. it doesn't import DOMDocument into the current namespace.
This is a problem with VC .NET where there is a Microsoft definition of
DOMDocument that clashes with Xerces if you aren't careful (and we
weren't in 1.0 :>.)
Version 1.1 keeps everything in the Xerces namespace, except in the
actual cpp files (where it doesn't matter).
CHeers,
Berin
Andrew wrote:
> Good day,
>
> I have never come across this problem before and I am not sure how to go about
> fixing it. So any assisstance would be greatly appreciated.
>
> I am working under VS .Net
>
> I have one project file building a DLL which links in Xerces,XSec etc. with no
> problem.
>
> I have another exe project that is linking in the lib created from the above
> dll.
>
> I am #include'ing an .h file from the DLL project in my .exe project.
> This results in a chain of #include's to XSec class that raise the following
> compilation error (or variation of this error w.r.t. different files).
>
> \xsec\dsig\DSIGTransform.hpp(80) : error C2874: using-declaration causes a
> multiple declaration of 'xercesc_2_4::DOMDocument'
> \Xerces\include\xercesc\dom\DOMDocument.hpp(103) : see declaration
> of 'xercesc_2_4::DOMDocument'
>
> The DSIGTranform uses XSEC_DECLARE_XERCES_CLASS macro to forward declare the
> DOMDocument class, which is later defined by DOMDocument itself.
>
> None of the other classes such as DOMNode that are forward declared cause any
> problems, just DOMDocument.
>
> I've attempted to unwind the #include order to see if that turned up anything,
> but it hasn't.
>
> I'll include the def'n of the macro here for completeness:
> #define XSEC_DECLARE_XERCES_CLASS(NAME) namespace XERCES_CPP_NAMESPACE { class
> NAME; } using XERCES_CPP_NAMESPACE::NAME
>
> Thanks in advance for any help you could provide
>
> Andrew
>
>
>