激情综合丁香-激情综合六月-激情综合婷婷亚洲图片-激情综合图区-激情综合网五月


主題:編譯通不過

  共有48403人關注過本帖    
客人
1樓


編譯通不過  發帖心情 Post By:2013-3-22 10:34:00   [只看該作者]

VS2008編譯老是通不過啊,請各位幫助一下,
1>C:\Program Files\Windows CE Tools\wce600\EM9170\include\ARMV4I\shellapi.h(321) : error C2061: syntax error : identifier 'SHFILEINFOW'
1>D:\Program Files\Microsoft Visual Studio 9.0\VC\ce\atlmfc\include\afxv_w32.h(232) : fatal error C1083: Cannot open include file: 'mbctype.h': No such file or directory

在MFC下調試成功的一個類(實現一個儀表),搬到智能設備下的MFC應用程序編譯就通不過了,咋回事呢?

  單帖管理 | 引用 | 回復 回到頂部
帥哥喲,離線,有人找我嗎?
yy
2樓 信息 | 搜索 | 郵箱


加好友 發短信
  發帖心情 Post By:2013-3-22 11:40:00   [只看該作者]

SHFILEINFOW沒定義,這個結構體在shellapi.h里定義的,根據你是否定義了UNICODE決定到底是該使用SHFILEINFOA還是SHFILEINFOW。
mbctype.h這個頭文件CE沒有,CE只有ctype.h。

WINCE比windows精簡的很多,其中WINCE只支持UNICODE,所以移植的時候ANSI的都要改成UNICODE的,就是char的都要改成WCHAR的,char字符串和WCHAR字符串可以用mbstowcs和wcstombs來轉。你兩個問題都是這個原因。

  單帖管理 | 引用 | 回復 回到頂部
客人
3樓


能說的詳細點嗎  發帖心情 Post By:2013-3-22 12:24:00   [只看該作者]

你好謝謝你解答,我把編譯模式改成UNICODE后,原來的錯誤確實沒有了,但是心的錯誤馬上又來了,一下增加到20幾條,哎,wince下移植看來需要改動的地方很多啊,我想用你們的硬件開發產品,軟件這一塊受局限太大了,以前主要做硬件,請多多幫助,謝謝
1>正在編譯...
1>stdafx.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>D:\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\em9170\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>D:\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\em9170\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>D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlosapice.h(910) : warning C4996: '_vsnprintf' was declared deprecated
1>        c:\program files\windows ce tools\wce600\em9170\include\armv4i\stdlib.h(377) : see declaration of '_vsnprintf'
1>        Message: 'This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>D:\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\em9170\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>D:\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\em9170\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>D:\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\EM9170\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>D:\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\EM9170\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>D:\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\EM9170\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>D:\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\EM9170\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>D:\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\EM9170\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>D:\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\EM9170\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>deemo.cpp
1>deemoDlg.cpp
1>Meter.cpp
1>d:\我的文檔\visual studio 2005\projects\deemo\deemo\MemDC.h(81) : error C3861: 'SetMapMode': identifier not found
1>d:\我的文檔\visual studio 2005\projects\deemo\deemo\MemDC.h(83) : error C3861: 'SetWindowOrg': identifier not found
1>.\Meter.cpp(177) : error C2039: 'Arc' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(192) : error C2039: 'Arc' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(254) : error C2039: 'CreatePolygonRgn' : is not a member of 'CRgn'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(501) : see declaration of 'CRgn'
1>.\Meter.cpp(254) : error C2065: 'ALTERNATE' : undeclared identifier
1>.\Meter.cpp(280) : error C2664: 'CFont::CreateFont' : cannot convert parameter 14 from 'const char [6]' to 'LPCTSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\Meter.cpp(287) : error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [6]' to 'const wchar_t *'
1>        with
1>        [
1>            BaseType=wchar_t,
1>            StringTraits=StrTraitMFC<wchar_t>
1>        ]
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\Meter.cpp(292) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(298) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(303) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(308) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(314) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(319) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(324) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(329) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(334) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(512) : error C2039: 'Arc' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(534) : error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [6]' to 'const wchar_t *'
1>        with
1>        [
1>            BaseType=wchar_t,
1>            StringTraits=StrTraitMFC<wchar_t>
1>        ]
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\Meter.cpp(541) : error C2664: 'CFont::CreateFont' : cannot convert parameter 14 from 'const char [6]' to 'LPCTSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\Meter.cpp(545) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>.\Meter.cpp(546) : error C2039: 'TextOut' : is not a member of 'CDC'
1>        D:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxwin.h(546) : see declaration of 'CDC'
1>Generating Code...
1>生成日志保存在“file://d:\我的文檔\Visual Studio 2005\Projects\deemo\deemo\EM9170 (ARMV4I)\Debug\BuildLog.htm”
1>deemo - 22 個錯誤,11 個警告
========== 生成: 0 已成功, 1 已失敗, 0 最新, 0 已跳過 ==========


  單帖管理 | 引用 | 回復 回到頂部
帥哥喲,離線,有人找我嗎?
yy
4樓 信息 | 搜索 | 郵箱


加好友 發短信
  發帖心情 Post By:2013-3-22 14:12:00   [只看該作者]

把windows上的程序移植到CE上確實不是改改配置就可以的,要改的地方很多的,大部分原因是CE精簡了一些重復封裝的庫函數還有就是UNICODE的問題。被精簡掉的庫函數可以用其他函數代替,UNICODE的問題一般錯誤很多,但是并不難改。

你前面很多寬字符串處理函數的錯誤應該是你的參數沒弄對,printf("test");對應wprintf(L"test");    int len = strlen("test");對應int len = wcslen(L"test");寬字符串要記得加L
后面GDI里面TextOut這個函數CE是沒有的,這個函數就是把DrawText封裝了下,你自己用DrawText重新實現下吧。
const char [6]' to 'LPCTSTR這個錯誤就是你吧一個窄字符數組直接當寬字符串指針傳了,你要先用mbstowcs轉一下,或者你干脆把你整個工程的所有字符串都改成寬字符的。


  單帖管理 | 引用 | 回復 回到頂部

返回首頁

編譯通不過

用戶名:
            驗證碼: 驗證碼,看不清楚?請點擊刷新驗證碼
內容:
主站蜘蛛池模板: 特黄三级| 国产盗摄福利视频| 欧美成人亚洲国产精品| 91制片厂制作果冻传媒麻豆| 日本3级片| 亚洲与黑人| 成人欧美午夜视频毛片| 国产草比| 久久不卡免费视频| 1024香蕉国产在线视频| 久久一区二区三区免费| 毛片免费网站| 在线观看h片| 色偷偷亚洲第一成人综合网址| 美国三级毛片| 激情丝袜欧美专区在线观看| 青娱乐久草| 亚洲精品国产精品精| 最新亚洲精品| 无码日韩精品一区二区免费 | 久久五月天婷婷| 日韩在线小视频| 亚洲国产精品看片在线观看| 中文字幕成人| 91精品最新国内在线播放| 一级特级全黄| 人交性视频大全| 亚洲一区二区免费| 成人性一级视频在线观看| 免费观看又色又爽又大高清网站| 国内自拍网站| 欧美特黄录像播放| 国产精品果冻传媒在线| 特级黄国产片一级视频播放| 最新毛片网| 麻豆传煤一区免费入| 激情亚洲天堂| 国产在线精品福利91香蕉| 色婷婷六月天| 日韩欧美一中文字幕不卡| 日韩一卡2卡3卡四区别|