问题描述
我是新来的.
我有一个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 /amd64 /Oicf /h "CSObjectCache.h" /iid "CSObjectCache_i.c" "CSObjectCache.idl"
提供平台切换解决了我的问题.
Giving the platform switch solved my problem.
这篇关于创建64位IDL和其他文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!