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”
...全文
378 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
---------------------------------------------
代码和你使用的平台不一致
内容概要:本文提出了一种基于概率调控的风光联合出力极端场景生成方法,旨在有效应对风能与太阳能发电固有的强不确定性问题。该方法融合概率统计理论与优化控制策略,通过对历史风光出力数据进行建模,采用概率分布调控技术生成具有高代表性的极端场景集,从而为电力系统在极端天气条件下的运行分析提供可靠的数据支撑。文中详细阐述了模型的构建原理、核心算法设计及完整的场景生成流程,并利用实际案例验证了所提方法在提升场景多样性和极端性方面的有效性与实用性,显著增强了电力系统在高比例可再生能源接入背景下的风险评估与决策能力。; 适合人群:具备一定电力系统基础知识和Python编程能力,从事新能源发电、电力系统规划与运行、不确定性建模、场景生成及风险评估等相关领域的研究人员和工程技术人员。; 使用场景及目标:①用于电力系统中风光出力不确定性建模与极端场景的高效模拟;②支撑含高比例可再生能源电网的可靠性评估、安全校核、调度优化与风险防控研究;③为电力系统规划、应急管理和极端事件应对提供科学依据和技术工具。; 阅读建议:建议读者结合文中提供的Python代码进行动手实践,深入理解概率调控机制与场景生成算法的实现细节,掌握参数调整对场景特性的影响规律,并可进一步将该方法拓展应用于其他不确定性电源或多能源耦合系统的场景分析中。

4,171

社区成员

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

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