创建64位IDL和其他文件 [英] creating 64bit idl and other files

查看:149
本文介绍了创建64位IDL和其他文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是新来的.
我有一个com项目,在项目设置中,以下值给出了
配置属性-> c/c ++->预处理器->预处理器定义" _ATL_ATTRIBUTES

配置属性->链接器->嵌入式IDL->合并的IDL基本文件名" _cfgcachecallback.idl

配置属性->;链接器->高级->目标计算机" MACHINE:X64

编译此项目时,会创建_cfgcachecallback.idl,_cfgcachecallback.h,_cfgcachecallback.tlb,_cfgcachecallback_i.c,_cfgcachecallback_p.c文件.
当我在以64位计算机为目标的32位计算机上编译该项目时,生成的文件"_cfgcachecallback_p.c"中包含#if定义的(_M_AMD64).这似乎是正确的.但是,当我尝试在Windows 2003 64位计算机上编译同一项目时,文件"_cfgcachecallback_p.c"具有#if defined(_M_IA64).

我必须在项目设置中进行哪些更改,以确保生成的_cfgcachecallback_p.c文件针对AMD64.

我想确保我的目标是AMD64.
任何人都可以帮助我获得正确的AMD 64版本.
WBR,
Sabu.

Hi,
I new to com.
I have a com project where in the project settings the following values are given
"configuration properties-->c/c++-->Preprocessor-->preprocessor definitions" _ATL_ATTRIBUTES

"configuration properties-->Linker-->Embedded IDL-->merged IDL Base File name" _cfgcachecallback.idl

"configuration properties-->;Linker-->Advanced--> Target machine" MACHINE:X64

When compiling this project there are files created _cfgcachecallback.idl,_cfgcachecallback.h,_cfgcachecallback.tlb,_cfgcachecallback_i.c,_cfgcachecallback_p.c .
When i compile this project in a 32 bit machine targeting 64bit machine the file "_cfgcachecallback_p.c" generated is having a #if defined(_M_AMD64) in it.Which sees to be proper. But when i try to compile the same project in Windows 2003 64 bit machine the file "_cfgcachecallback_p.c" is having a #if defined(_M_IA64) .

what chnage i have to do in project settings to make sure that the file _cfgcachecallback_p.c generated is targeting the AMD 64.

I want to make sure that i target AMD 64 .
can any one help me in getting a proper AMD 64 build.
WBR,
Sabu.

推荐答案

查看项目属性的 MIDL 属性页下的目标环境:您正在谈论的是由 MIDL编译器生成的
Look at the Target environment under the MIDL property page on your project properties: the files you are talking about are generated by the MIDL compiler!


您好,
由于我在项目中没有IDL文件,因此没有MIDL选项卡.
因此,不可能在那里设置任何东西.
我在配置属性->链接器->嵌入式IDL-> MIDL命令"中尝试了命令行"/env win64".

文件"_cfgcachecallback_p.c"中包含以下注释.



/*此始终生成的文件包含代理存根代码*/


/*由MIDL编译器版本6.00.0366创建的文件*/
/* 2010年4月20日星期二07:55:22
*/
/* _cfgcachecallback.idl的编译器设置:
Oicf,W1,Zp8,env = Win64(32b运行)
协议:dce,ms_ext,c_ext,健壮
错误检查:分配引用bounds_check枚举stub_data
VC __declspec()装饰级别:
__declspec(uuid()),__ declspec(selectany),__ declspec(novtable)
DECLSPEC_UUID(),MIDL_INTERFACE()
*/
//@@ MIDL_FILE_HEADING()


WBR,
sabu
Hi,
As i dont have an IDL file in the project i dont get an MIDL tab .
So its not possible to set any thing there.
i tried the command line "/env win64" in "configuration properties-->Linker-->Embedded IDL-->MIDL commands".

the file "_cfgcachecallback_p.c" is having the following comments in it.



/* this ALWAYS GENERATED file contains the proxy stub code */


/* File created by MIDL compiler version 6.00.0366 */
/* at Tue Apr 20 07:55:22 2010
*/
/* Compiler settings for _cfgcachecallback.idl:
Oicf, W1, Zp8, env=Win64 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )


WBR,
sabu



使用自定义构建的IDL文件.
在IDL文件属性中,选择了常规->工具自定义构建工具".
自定义构建步骤-> 命令行中,温和的命令提供了一些选项.我必须在此处执行平台规范,即
Hi,
The IDL files where using custom build.
In the IDL files properties General -->Tools "custom build tool" was selected.
And in the Custom Build Step -->Command line the mild command was given with some options. I had to do the platform specification here ie
midl /amd64 /Oicf /h "CSObjectCache.h" /iid "CSObjectCache_i.c" "CSObjectCache.idl"



提供平台切换解决了我的问题.



Giving the platform switch solved my problem.


这篇关于创建64位IDL和其他文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆