Compiler Errors When You Use #import with XML in Visual C++ .NET

L

lucho

Hi everyone,
I have the same problem as described under Q316317
(http://support.microsoft.com/default.aspx?scid=kb;en-
us;316317) ie a compiler error saying
c:\Program Files\Microsoft Visual Studio .NET\Vc7
\PlatformSDK\Include\ShObjIdl.h(9528) : error
C2872: 'IXMLDOMDocument' : ambiguous symbol
could be 'c:\Program Files\Microsoft Visual
Studio .NET\Vc7\PlatformSDK\Include\MsXml.h(1845) :
IXMLDOMDocument'
or 'c:\MAC\Reader\src\APP\AppComponent\Debug\msxml3.t
lh(2965) : MSXML2::IXMLDOMDocument'

but the solution explained on Microsfot website doesn't
work for me, (still suppress some errors, but it doesn't
suppress them all)

Any ideas ?

I'm using VC7, and the program used to be compiled under
VC5 or VC6.


thanks for help,


Luc
 
S

Silviu Guea [MSFT]

Can you post a small sample code that generates the error?
Are you including both MSXML and MSXML2 namespaces like below? Or use
#import with no_namespace?

using namespace MSXML;
using namespace MSXML2;


--
Silviu Guea, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "lucho" <[email protected]>
| Sender: "lucho" <[email protected]>
| Subject: Compiler Errors When You Use #import with XML in Visual C++ .NET
| Date: Tue, 19 Aug 2003 14:46:51 -0700
| Lines: 27
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNmm2YD3ndgvsOrSFmJ3A5yCHLa4w==
| Newsgroups: microsoft.public.dotnet.languages.vc
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:27382
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.languages.vc
|
| Hi everyone,
| I have the same problem as described under Q316317
| (http://support.microsoft.com/default.aspx?scid=kb;en-
| us;316317) ie a compiler error saying
| c:\Program Files\Microsoft Visual Studio .NET\Vc7
| \PlatformSDK\Include\ShObjIdl.h(9528) : error
| C2872: 'IXMLDOMDocument' : ambiguous symbol
| could be 'c:\Program Files\Microsoft Visual
| Studio .NET\Vc7\PlatformSDK\Include\MsXml.h(1845) :
| IXMLDOMDocument'
| or 'c:\MAC\Reader\src\APP\AppComponent\Debug\msxml3.t
| lh(2965) : MSXML2::IXMLDOMDocument'
|
| but the solution explained on Microsfot website doesn't
| work for me, (still suppress some errors, but it doesn't
| suppress them all)
|
| Any ideas ?
|
| I'm using VC7, and the program used to be compiled under
| VC5 or VC6.
|
|
| thanks for help,
|
|
| Luc
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top