WINCE CEWMPHostM例子在VS2005 WINCE5.0下编译(转载)
2009-02-02 16:10
323 查看
1,使用VS2005 自带的转换工具把它转为vs2005下的工程。
如果这样马上编译会得到如下的错误:
Rebuild All started: Project: SPWmpHost, Configuration: Debug Pocket PC 2003 (ARMV4) ------
1>Deleting intermediate and output files for project 'SPWmpHost', configuration 'Debug|Pocket PC 2003 (ARMV4)'
1>Compiling...
1>wmphost.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>WMPGuids.cpp
1>PopDlgs.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>MediaLibraryDlg.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>CWMPHost.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>CWMPEventDispatch.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>Generating Code...
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>BSCMAKE: error BK1506 : cannot open file './Pocket PC 2003 (ARMV4)/Debug/CWMPEventDispatch.sbr': No such file or directory
1>Build log was saved at "file://d:/wince/wmpmobilesamples/CEWMPHostML/Pocket PC 2003 (ARMV4)/Debug/BuildLog.htm"
其实就是_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA 没有在编译选项定义,这样需要修改工程的设置:
具体修改如下:
1。在GENERAL选项卡的USE OF ATL一项,在下拉菜单中选择“Static Link to ATL”一项。
2.设置wmsdk的路径
3。增加预编译选项。
4,去掉不必要的链接库,atlce400.lib。
经过以上的修改,就可以编译这个项目文件,并且可以正确生成可执行文件。
如果这样马上编译会得到如下的错误:
Rebuild All started: Project: SPWmpHost, Configuration: Debug Pocket PC 2003 (ARMV4) ------
1>Deleting intermediate and output files for project 'SPWmpHost', configuration 'Debug|Pocket PC 2003 (ARMV4)'
1>Compiling...
1>wmphost.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>WMPGuids.cpp
1>PopDlgs.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>MediaLibraryDlg.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>CWMPHost.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>CWMPEventDispatch.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1>
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>WINVER was defined to be 0x0400, as it was either not set or set to a lower value
1>D:/Program
Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include/atlhost.h(43) :
fatal error C1189: #error : atlhost.h requires Hosting support
(_ATL_NO_HOSTING is defined). For Windows CE platforms without DCOM
support, _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined.
1>Generating Code...
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>BSCMAKE: error BK1506 : cannot open file './Pocket PC 2003 (ARMV4)/Debug/CWMPEventDispatch.sbr': No such file or directory
1>Build log was saved at "file://d:/wince/wmpmobilesamples/CEWMPHostML/Pocket PC 2003 (ARMV4)/Debug/BuildLog.htm"
其实就是_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA 没有在编译选项定义,这样需要修改工程的设置:
具体修改如下:
1。在GENERAL选项卡的USE OF ATL一项,在下拉菜单中选择“Static Link to ATL”一项。
2.设置wmsdk的路径
3。增加预编译选项。
4,去掉不必要的链接库,atlce400.lib。
经过以上的修改,就可以编译这个项目文件,并且可以正确生成可执行文件。
相关文章推荐
- WINCE CEWMPHostM例子在VS2005 WINCE5.0下编译(转载)
- vs2003和vs2005的编译区别(转) (2009-10-27 10:43:28)转载
- 转载:VS2005编译WM5时出现__GSHandlerCheck链接错误
- WinCE5.0和WinCE6.0下编译选项介绍续(转载)
- 将sqlite3编译成给WINCE使用的DLL,并封装成C++的步骤(使用VS2005)
- 条件编译#ifdef、#ifndef、#if的例子(转载)
- Windows7下VS2005创建/编译Wince工程出错
- VS2005例子中编译时出现"已跳过生成: 项目", 不编译, 也不报错
- VS2005下编译wince平台下的sqlite3源码出错启示
- Java动态编译一个简单的例子(我转载的,但是经过修定,可以在Eclipse下运行)
- wince6.0 vs2005 编译出错
- VS2005 WINCE 流驱动开发流程 转载
- 将sqlite3编译成给WINCE使用的DLL,并封装成C++的步骤(使用VS2005)
- VS2005 WINCE 简单的 流驱动 模板 转载
- 编译jrtplib第一个例子(转载)
- 编译问题:编译器VS2005 平台wince
- 【转载】WinCE编译一二三
- 我的Firefox插件开发之旅(5)——编译和测试第一个Plugin例子:npruntime(转载)
- 【转】wince6.0 vs2005 编译选项详解
- VS2005中读写配置文件(方法一)(转载)