昨天刚装的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啊?
[509 byte] By [openforever-++] at [2008-2-18]
# 1
Set Active Configuration:选上Emulator
yzx0023-无聊客 at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 2
我这怎么没有Emulator选项?
只有Release和Dubug, 我现在选为Release,就不出现那个ERROR提示了.

新出了如下错误
//fatal error LNK1104: cannot open file 'libc.lib'

??
openforever-++ at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 3
我在configurations添加了Emulaor(Release)
Compile可以通过,但是Build就出现错误为

//fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'SH3'

什么原因啊?
openforever-++ at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 4
注意选择第三个win32 wce x86 debug,就是emulator左边的选项,你必须选择合适cpu类型!
liuxk99-极地狐 at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 5
// liuxk99(极地狐)
可否说详细一点..
openforever-++ at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 7
不过我怀疑你的第一次错误只是"DOWNLOADING ERROR",可执行文件已经编译好了,就在你的PROJECT目录下
# 8
有个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'
注意这个地方也要匹配正确
liuxk99-极地狐 at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 9
// liuxk99(极地狐)
平台只有一个选择STANDARDSDK_42

选项四也只有一个选择STANDARDSDK_42
openforever-++ at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 10
SP4已安装,还是出现同样的错误.
openforever-++ at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...
# 11
建项目的时候,选中 WinCE emulator CPU(在向导页的右下角)
powerbamboo-清风明月 at 2007-10-22 > top of Msdn China Tech,硬件/嵌入开发,嵌入开发(WinCE)...