2

我继承了一个旧的 Visual Studio 6 C++ 程序。我有一台 Windows 7 电脑。我在我的电脑上安装了一个 XP 虚拟机。已安装 Visual Studio 6 和 Service Pack 6。我正在尝试在调试模式下构建 .exe 文件。我继续收到错误

C2011: 'IXMLDOMImplementation' : 'struct' type redefinition in msxml4.tlh file. 

所有结构和枚举定义都发生错误。KB 269194 指出如果以并行模式安装了较新版本的 MSXML,则必须显式使用该版本的全局唯一标识符 (GUID) 或 ProgID 来运行示例代码。GUID 使用如下 declspec(uuid()) 指定。struct __declspec(uuid("50ea08b0-dd1b-4664-9a50-c2f40f4bd79a")) IXMLDOMSchemaCollection2 : IXMLDOMSchemaCollection { 我不相信我应该进行任何代码更改。我已经在虚拟机上安装了 MSXML4。知识库文章 269194 讨论了该问题。它没有帮助。

文件 msxml4.h、msxml4.cpp、msxml4.dll、msxml4.tlh 和 msxml.tli 都在项目目录中。我确实在我的虚拟 XP 机器上安装了 MSXML4。我已将这些文件添加到此工作区的 Visual Studio 中的包含路径中。任何想法都非常感谢。

4

1 回答 1

0

This may be the combination of #import xml and /MP multi-processor compile. The two are not compatible. Identify any modules that have the #import. Build them WITHOUT the /MP switch. The other modules can safely use the /MP switch.

于 2021-08-18T23:32:39.713 回答