MFC程序改 针对210SDK平台出错

george_8703 2012-09-28 06:06:05
在DEBUG下完全OK.切换到MINI210SDK出现以下错误.
1>stdafx.cpp
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(98) : warning C4005: '_WIN32_WCE' : macro redefinition
1> command-line arguments : see previous definition of '_WIN32_WCE'
1>_WIN32_WINDOWS was undefined as it is not supported for Windows CE
1>C:\Program Files\Windows CE Tools\wce600\MiniMFC210\include\ARMV4I\malloc.h(45) : error C2143: syntax error : missing ',' before '*'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlosapice.h(879) : warning C4996: 'wcsncpy' was declared deprecated
1> c:\program files\windows ce tools\wce600\minimfc210\include\armv4i\stdlib.h(177) : see declaration of 'wcsncpy'
1> Message: 'This function or variable may be unsafe. Consider using wcsncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlosapice.h(1075) : warning C4996: 'wcsncpy' was declared deprecated
1> c:\program files\windows ce tools\wce600\minimfc210\include\armv4i\stdlib.h(177) : see declaration of 'wcsncpy'
1> Message: 'This function or variable may be unsafe. Consider using wcsncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlosapice.h(1123) : warning C4996: 'wcsncpy' was declared deprecated
1> c:\program files\windows ce tools\wce600\minimfc210\include\armv4i\stdlib.h(177) : see declaration of 'wcsncpy'
1> Message: 'This function or variable may be unsafe. Consider using wcsncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atltime.h(402) : error C3861: 'wcsftime': identifier not found
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atltime.h(429) : error C3861: 'wcsftime': identifier not found
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlcomtime.h(367) : error C3861: 'wcsftime': identifier not found
1>项目 : warning PRJ0018 : 未找到下列环境变量:
1>$(PLATFORMDEFINES)
1>生成日志保存在“file://e:\USER\window\window\MiniMFC210 (ARMV4I)\Release\BuildLog.htm”
...全文
375 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
george_8703 2012-10-09
  • 打赏
  • 举报
回复
不能这样做。有什么好方法没有?直接生成更好。
george_8703 2012-09-29
  • 打赏
  • 举报
回复
原因在于我加了定义:_WIN32_WCE 0X0501,去掉后编译出错。
1>_WIN32_WINDOWS was undefined as it is not supported for Windows CE
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlosapice.h(879) : warning C4996: 'wcsncpy' was declared deprecated
1> c:\program files\windows ce tools\wce600\minimfc210\include\armv4i\stdlib.h(177) : see declaration of 'wcsncpy'
1> Message: 'This function or variable may be unsafe. Consider using wcsncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlosapice.h(893) : warning C4996: '_vsnwprintf' was declared deprecated
1> c:\program files\windows ce tools\wce600\minimfc210\include\armv4i\stdlib.h(382) : see declaration of '_vsnwprintf'
1> Message: 'This function or variable may be unsafe. Consider using _vsnwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlchecked.h(157) : warning C4996: '_strlwr' was declared deprecated
1> C:\Program Files\Windows CE Tools\wce600\MiniMFC210\include\ARMV4I\stdlib.h(240) : see declaration of '_strlwr'
1> Message: 'This function or variable may be unsafe. Consider using _strlwr_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlchecked.h(167) : warning C4996: '_wcslwr' was declared deprecated
1> C:\Program Files\Windows CE Tools\wce600\MiniMFC210\include\ARMV4I\stdlib.h(189) : see declaration of '_wcslwr'
1> Message: 'This function or variable may be unsafe. Consider using _wcslwr_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlchecked.h(192) : warning C4996: '_wcslwr' was declared deprecated
1> C:\Program Files\Windows CE Tools\wce600\MiniMFC210\include\ARMV4I\stdlib.h(189) : see declaration of '_wcslwr'
1> Message: 'This function or variable may be unsafe. Consider using _wcslwr_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlchecked.h(209) : warning C4996: '_wcsupr' was declared deprecated
1> C:\Program Files\Windows CE Tools\wce600\MiniMFC210\include\ARMV4I\stdlib.h(190) : see declaration of '_wcsupr'
1> Message: 'This function or variable may be unsafe. Consider using _wcsupr_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlchecked.h(226) : warning C4996: '_wcsupr' was declared deprecated
1> C:\Program Files\Windows CE Tools\wce600\MiniMFC210\include\ARMV4I\stdlib.h(190) : see declaration of '_wcsupr'
1> Message: 'This function or variable may be unsafe. Consider using _wcsupr_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlchecked.h(291) : warning C4996: '_gcvt' was declared deprecated
1> C:\Program Files\Windows CE Tools\wce600\MiniMFC210\include\ARMV4I\stdlib.h(529) : see declaration of '_gcvt'
1> Message: 'This function or variable may be unsafe. Consider using _gcvt_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>正在编译...
1>windowView.cpp
1>.\windowView.cpp(21) : error C2039: 'OnFilePrint' : is not a member of 'CView'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4305) : see declaration of 'CView'
1>.\windowView.cpp(21) : error C2065: 'OnFilePrint' : undeclared identifier
1>.\windowView.cpp(22) : error C2039: 'OnFilePrint' : is not a member of 'CView'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4305) : see declaration of 'CView'
1>.\windowView.cpp(23) : error C2039: 'OnFilePrintPreview' : is not a member of 'CView'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4305) : see declaration of 'CView'
1>.\windowView.cpp(23) : error C2065: 'OnFilePrintPreview' : undeclared identifier
1>.\windowView.cpp(61) : error C2065: 'CPrintInfo' : undeclared identifier
1>.\windowView.cpp(61) : error C2065: 'pInfo' : undeclared identifier
1>.\windowView.cpp(62) : error C2448: 'CwindowView::OnPreparePrinting' : function-style initializer appears to be a function definition
1>.\windowView.cpp(67) : error C2061: syntax error : identifier 'CPrintInfo'
1>.\windowView.cpp(72) : error C2061: syntax error : identifier 'CPrintInfo'
1>windowDoc.cpp
1>window.cpp
1>e:\user\window\window\MainFrm.h(8) : error C2504: 'CMDIFrameWnd' : base class undefined
1>e:\user\window\window\ChildFrm.h(9) : error C2504: 'CMDIChildWnd' : base class undefined
1>e:\user\window\window\windowView.h(26) : error C2061: syntax error : identifier 'CPrintInfo'
1>e:\user\window\window\windowView.h(27) : error C2061: syntax error : identifier 'CPrintInfo'
1>e:\user\window\window\windowView.h(28) : error C2061: syntax error : identifier 'CPrintInfo'
1>.\window.cpp(25) : error C2039: 'OnFilePrintSetup' : is not a member of 'CWinApp'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4921) : see declaration of 'CWinApp'
1>.\window.cpp(25) : error C2065: 'OnFilePrintSetup' : undeclared identifier
1>.\window.cpp(74) : error C3861: 'LoadStdProfileSettings': identifier not found
1>.\window.cpp(77) : error C2065: 'CMultiDocTemplate' : undeclared identifier
1>.\window.cpp(77) : error C2065: 'pDocTemplate' : undeclared identifier
1>.\window.cpp(78) : error C2061: syntax error : identifier 'CMultiDocTemplate'
1>.\window.cpp(88) : error C2039: 'LoadFrame' : is not a member of 'CMainFrame'
1> e:\user\window\window\MainFrm.h(7) : see declaration of 'CMainFrame'
1>.\window.cpp(93) : error C2440: '=' : cannot convert from 'CMainFrame *' to 'CWnd *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\window.cpp(108) : error C2039: 'ShowWindow' : is not a member of 'CMainFrame'
1> e:\user\window\window\MainFrm.h(7) : see declaration of 'CMainFrame'
1>.\window.cpp(109) : error C2039: 'UpdateWindow' : is not a member of 'CMainFrame'
1> e:\user\window\window\MainFrm.h(7) : see declaration of 'CMainFrame'
1>MainFrm.cpp
1>e:\user\window\window\MainFrm.h(8) : error C2504: 'CMDIFrameWnd' : base class undefined
1>.\MainFrm.cpp(16) : error C2027: use of undefined type 'CMDIFrameWnd'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4418) : see declaration of 'CMDIFrameWnd'
1>.\MainFrm.cpp(19) : error C2440: 'static_cast' : cannot convert from 'int (__cdecl CMainFrame::* )(LPCREATESTRUCT)' to 'int (__cdecl CWnd::* )(LPCREATESTRUCT)'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\MainFrm.cpp(20) : error C2027: use of undefined type 'CMDIFrameWnd'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4418) : see declaration of 'CMDIFrameWnd'
1>.\MainFrm.cpp(45) : error C2027: use of undefined type 'CMDIFrameWnd'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4418) : see declaration of 'CMDIFrameWnd'
1>.\MainFrm.cpp(49) : error C2664: 'CToolBar::CreateEx' : cannot convert parameter 1 from 'CMainFrame *const ' to 'CWnd *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\MainFrm.cpp(56) : error C2664: 'CStatusBar::Create' : cannot convert parameter 1 from 'CMainFrame *const ' to 'CWnd *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\MainFrm.cpp(65) : error C2039: 'EnableDocking' : is not a member of 'CToolBar'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxext.h(408) : see declaration of 'CToolBar'
1>.\MainFrm.cpp(66) : error C3861: 'EnableDocking': identifier not found
1>.\MainFrm.cpp(67) : error C3861: 'DockControlBar': identifier not found
1>.\MainFrm.cpp(74) : error C2027: use of undefined type 'CMDIFrameWnd'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4418) : see declaration of 'CMDIFrameWnd'
1>ChildFrm.cpp
1>e:\user\window\window\ChildFrm.h(9) : error C2504: 'CMDIChildWnd' : base class undefined
1>.\ChildFrm.cpp(15) : error C2440: 'return' : cannot convert from 'CChildFrame *' to 'CObject *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\ChildFrm.cpp(15) : error C2027: use of undefined type 'CMDIChildWnd'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4419) : see declaration of 'CMDIChildWnd'
1>.\ChildFrm.cpp(18) : error C2027: use of undefined type 'CMDIChildWnd'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4419) : see declaration of 'CMDIChildWnd'
1>.\ChildFrm.cpp(36) : error C2027: use of undefined type 'CMDIChildWnd'
1> C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(4419) : see declaration of 'CMDIChildWnd'
1>项目 : warning PRJ0018 : 未找到下列环境变量:
1>$(PLATFORMDEFINES)
1>生成日志保存在“file://e:\USER\window\window\MiniMFC210 (ARMV4I)\Release\BuildLog.htm”
1>window - 44 个错误,11 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
========== 部署: 0 已成功, 0 已失败, 0 已跳过 ==========
george_8703 2012-09-29
  • 打赏
  • 举报
回复
我要将VC2005开发的应用转换为平台下的软件,要怎样做才行?
Gloveing 2012-09-28
  • 打赏
  • 举报
回复
>_WIN32_WINDOWS was undefined as it is not supported for Windows CE
---------------------------------------------
代码和你使用的平台不一致
内容概要:本文出自罗兰贝格关于工业4.0现状的报告,系统分析了制造业在数字化转型过程中的实际进展与挑战。报告指出,尽管“工业4.0”概念提出已逾十年,但多数企业仍未实现预期的智能化、自组织生产目标,主要受限于技术复杂性、组织孤岛、投资回报周期长及人才短缺等问题。通过对领先制造企业的研究,报告提炼出三大成功要素:一是制定基于现实的工业4.0愿景与全面战略,明确用例优先级;二是建立“中心辐射式”组织架构,设立专职数字化制造部门,推动跨职能协作与规模化落地;三是构建统一的IT/OT目标架构,强化数据生态与系统互操作性。报告特别强调,高价值用例如预测性维护、实时参数优化、视觉检测等已在汽车与半导体行业显现显著成效,企业应聚焦可量化回报的场景,结合资源现实,分阶段推进转型。; 适合人群:制造业企业管理者、数字化转型负责人、工业互联网从业者及政策制定者; 使用场景及目标:①帮助企业评估自身工业4.0成熟度并制定务实发展战略;②为制造企业设计组织架构与IT/OT技术路线图提供参考;③指导资源优先配置于高价值数字化用例,提升投资回报率; 阅读建议:建议结合企业实际生产场景阅读,重点关注“中心辐射式”运营模式与六大高价值用例的适用性分析,同时参考报告中的汽车行业案例,因地制宜地规划数字化路径。
内容概要:本文围绕基于蚁狮优化算法(ALO)在复杂三维动态环境下求解多无人机动态避障路径规划问题展开研究,并提供了完整的Matlab代码实现。该研究旨在解决多无人机系统在存在障碍物和动态变化环境中的高效、安全路径规划挑战,通过引入ALO算法优化飞行轨迹,有效规避障碍并实现路径最优。研究不仅关注算法层面的实现,还涵盖了目标函数设计、约束条件处理、环境建模等关键技术环节,确保路径规划结果兼具可行性与鲁棒性。此外,文档附带丰富的相关科研资源,涵盖路径规划、智能优化算法、机器学习、电力系统等多个领域,为后续拓展研究提供坚实支撑。; 适合人群:具备一定编程基础,熟悉Matlab工具,从事无人机路径规划、智能优化算法或智能系统研究的科研人员及研究生。; 使用场景及目标:①研究复杂三维动态环境下多无人机的协同避障路径规划问题;②掌握蚁狮优化算法(ALO)在路径规划中的应用与实现机制;③为智能交通、无人系统控制、自动化调度等相关课题提供算法参考与代码支持; 阅读建议:建议结合Matlab代码深入理解ALO算法的具体实现流程,重点关注目标函数构建、动态障碍建模与避障策略设计等关键模块,同时可参照文中提及的其他智能优化算法(如PSO、GWO等)进行对比实验,进一步提升算法性能分析与工程应用能力。

4,171

社区成员

发帖
与我相关
我的任务
社区描述
Windows专区 一般软件使用
社区管理员
  • 一般软件使用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧