MSXML conflicting issues trying to port VC6 project to VC8.

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello,

Trying to port a large COM application from VC6 to VC8, but its usage
of MSXML3 is giving me some nasty trouble :(.


The error:

d:\project\common\XMLPropertiesToStringConverter.h(24) : error C2872:
'IXMLElement' : ambiguous symbol
could be 'c:\program files\microsoft visual studio
8\vc\platformsdk\include\msxml.h(11382) : IXMLElement'
or 'd:\project\main\debug\msxml3.tlh(1675) :
MSXML2::IXMLElement'


Background information:

* XMLPropertiesToStringConverter.h belongs to a DLL (common.dll)
* common.dll compiles (I did have to add MSXML2:: everywhere though)
* The 'main' project that creates the executable includes
XMLPropertiesToStringConverter.h
* Line 24 of XMLPropertiesToStringConverter.h is "#import <msxml3.dll>"
* I get a heaps of the above error, with each of them pointing to the
line 24 import statement.


Things I've tried:

* Replacing c:\program files\microsoft visual studio
8\vc\platformsdk\include\msxml.h with VC6.0's.
This caused an error in generating 'main's precompiled header,
specifically shobjidl.idl referencing an undefined XML related object.

* "#import <msxml3.dll> rename_namespace("MY_MSXML2")"
No difference


Other:

* 'main' processes "C:\Program Files\Microsoft Visual Studio
8\VC\PlatformSDK\include\msxml.idl" when generating its precompiled
header, which I think has something to do with this.


'main's stdafx.h includes the following headers:

#include <afx.h>
#include <afxdisp.h>
#include <comdef.h>
#include <atlbase.h>
#include <afxmt.h>
#include <winsock2.h>
#include <afxsock.h>
#include <atlcom.h>
#include <Mmsystem.h>


I'm going to keep slugging away and see if I can come dig up something,
but yeah any help would be much appreciated ;).

Cheers,
Murray

.



Relevant Pages

  • Re: where is a copy of atlstr.h ??
    ... program for Visual Studio parks things in terms of directories, ... your expectation that Microsoft "documents this" is unreasonable. ... would have carry documentation for many previous versions of Visual Studio. ... or ATL header files are present on your computer. ...
    (microsoft.public.vc.language)
  • Precompiled headers problem with 2005
    ... I have a strange problem with precompiled headers with VC8. ... I have the problem while trying to use a precompiled header to build another precompiled header. ... both in the Visual Studio 2001 and Visual Studio 2005 command prompt and it breaks with 2005 on the second command line. ... rem Error saying that another process is accessing level2.pch. ...
    (microsoft.public.vc.language)
  • Precompiled headers problem with 2005
    ... I have a strange problem with precompiled headers with VC8. ... problem while trying to use a precompiled header to build another ... both in the Visual Studio 2001 and Visual Studio 2005 command prompt ... rem Error saying that another process is accessing level2.pch. ...
    (microsoft.public.dotnet.languages.vc)
  • Precompiled headers problem with 2005
    ... I have a strange problem with precompiled headers with VC8. ... problem while trying to use a precompiled header to build another ... both in the Visual Studio 2001 and Visual Studio 2005 command prompt ... rem Error saying that another process is accessing level2.pch. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Pre-compiled header file
    ... Before adding anything I tried to compile it and received ... This is because header files are ... precompiled header, because it's a huge, unwieldy ... your own code that's #included by at least 25-50% of your cpp files. ...
    (microsoft.public.vc.language)