返回> 网站首页 

eVC程序移植到VS2008

yoours2015-04-15 18:38:24 阅读 1636

简介一边听听音乐,一边写写文章。

一、错误
 1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxver_.h(77) : fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
 
这里我们通过打开Project properties对话框里,切换到C/C++->Code generation页,将Runtime Libarary 设置成“Multi-threaded DLL(/MD)”。即可解决此问题。
 
二、错误
1>.\TXDEMO.rc(170) : fatal error RC1015: cannot open include file 'wceres.rc'.
 
这里我们需要在TXDEMO.RC文件里,将#include "wceres.rc"注释掉。
//#include "wceres.rc"     // WCE-specific components
 
三、错误
1>corelibc.lib(wwinmain.obj) : error LNK2019: unresolved external symbol wWinMain referenced in function wWinMainCRTStartup
1>Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug/TXDEMO.exe : fatal error LNK1120: 1 unresolved externals
此时,我们依旧打开project properties对话框,切换到Linker->Advanced页,将Entry Point由wWinMainCRTStartup改成WinMainCRTStartup。
 
此时再次编译,系统不在提示错误,但是还不能运行,接着设置项目属性,在Configuration Properties->Gengeral页将Use of MFC ,改成静态连接。
 
此时我们运行程序 ,您会发现程序启动后,就立刻退去。经过我的研究,发现是加载对话框资源失败,在此我们再此打开TXDEMO.RC源文件,
找到IDD_TXDEMO_DIALOG DIALOG DISCARDABLE 0, 0, 130, 90语句,将下面的窗体属性改成如下,即可。
WS_POPUP | WS_VISIBLE | WS_CAPTION
此时,再次编译工程,你可以进行DEBUG并可以运行程序。

四、错误
ERROR: dialog template has DS_MODALFRAME set, which is not supported
for Pocket PC and Smartphone

设置对话框样式为Thin即可解决。
微信小程序扫码登陆

文章评论

1636人参与,0条评论