__REQUIRED_RPCNDR_H_VERSION__

发布于 2024-07-06 09:24:59 字数 655 浏览 4 评论 0原文

我从 IDL 创建一个头文件。 IDL 文件已在 Visual C++ 2005 中编译。 生成的头文件包含 #define REQUIRED_RPCNDR_H_VERSION 475 。

我尝试在 Visual Studio 2003 中使用此头文件,其中 rpcndr.h 包含

{

#define RPCNDR_H_VERSION ( 450 ) // 和

#if ( RPCNDR_H_VERSION REQUIRED_RPCNDR_H_VERSION)

    #error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
#endif 

}

由于 450<475,我收到编译时错误。 有什么方法可以在 Visual Studio 2003 中使用头文件吗? 我需要更改 idl 文件的编译设置吗?

PS:我只能在 Visual C++ 2005 中编译 idl 文件。 (我没有选择在 VS 2003 中编译它)。

I create a header file from an IDL . The IDL file has been compiled in Visual C++ 2005 .
The generated header file contains #define REQUIRED_RPCNDR_H_VERSION 475 .

I tried to use this header file in Visual Studio 2003 , where rpcndr.h contains

{

#define RPCNDR_H_VERSION ( 450 ) // and

#if ( RPCNDR_H_VERSION < REQUIRED_RPCNDR_H_VERSION )

    #error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
#endif 

}

Since 450<475 , i get a compile time error . Is there any way i can use the header file in Visual Studio 2003 . Do i need to make changes in the compiltaion setting of idl file .

PS : I have to compile the idl file in Visual C++ 2005 only . ( I do not have a choice to compile it in VS 2003 ) .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

二货你真萌 2024-07-13 09:24:59

如果您的 2003 和 2005 配置使用相同版本的 Windows SDK,您可能会运气不佳(和/或只需要破解它并希望它能正常工作)。 不过,通常情况下,如果它们使用相同版本的 SDK 实用程序和标头,您可以使它们兼容。

我没有任何特定于此问题的信息,但我过去也遇到过类似的问题,我通过将两个版本的 VS 指向同一个较新的 SDK 版本来解决这些问题。

If your 2003 and 2005 configurations are using the same version of the Windows SDK, you might be out of luck (and/or just need to hack it and hope it works). Usually, though, you can make them compatible if they are using the same version of the SDK utilities and headers.

I don't have any info specific to this issue, but I have had similar problems in the past which I have resolved by pointing both versions of VS to the same later SDK version.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文