santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Lautenbach <>
Subject Re: Compilation error w.r.t. XSEC_DECLARE_XERCES_CLASS macro
Date Wed, 14 Apr 2004 10:48:59 GMT

My guess is you are using version 1.0?

Version 1.1 now has the following definition :

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).


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:
> Thanks in advance for any help you could provide
> Andrew

View raw message