昨天刚装的EVC4.0,编译一个简单的"HelloCE",出现错误,帮忙诊断一下.
ERROR提示,原文如下:
An application targeting A Standard SDK for Windows CE.NET and built for the SH3 CPU cannot bu run on the Emulatordevice . In order to run this application on any CPU other than the Emulator,you will have to install an SDK that is compatible with the Standard SDK for Windows CE.NET,then target a shadow platform pertaining to that SDK.Please see the eVC help documentation for additional details.
//我安装的是标准SDK,在微软网站上下载的,还装了SP3.(安装顺序eVC4.0+SP3+SDK)
现在提示我还要装个SDK,到底是那个SDK啊?
我这怎么没有Emulator选项?
只有Release和Dubug, 我现在选为Release,就不出现那个ERROR提示了.
新出了如下错误
//fatal error LNK1104: cannot open file 'libc.lib'
??
我在configurations添加了Emulaor(Release)
Compile可以通过,但是Build就出现错误为
//fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'SH3'
什么原因啊?
有个wce configuration工具栏,右键快捷菜单调出来
该工具栏有四个设置选项:分别是
工程:选择workspace中的其中激活的工程
平台:选择pocket pc(2002/2003) 或者 smartphone(2002/2003)
编译设置(主要是CPU类型,debug/release):比如说在ppc2002中有win32 (wce arm)debug/release,
win32 (wce x86)debug/release.在模拟器上运行,选择x86,设备的化选择arm,其它版本类推
设备:选择模拟器Pocket PC 2002 Emulation/Default Device(对应实际的设备)
问题出在第3个和第4个选项,arm 匹配 default device,x86 匹配 emulation.它不会自动对应。这是必须注意的地方。当然不排除还有其它原因
liner选项设置必须注意/MACHINE:IX86/ARM,
//fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'SH3'
注意这个地方也要匹配正确