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


主題:編譯通不過

  共有48404人關(guān)注過本帖    
客人
1樓


編譯通不過  發(fā)帖心情 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下調(diào)試成功的一個類(實現(xiàn)一個儀表),搬到智能設(shè)備下的MFC應(yīng)用程序編譯就通不過了,咋回事呢?

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


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

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

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

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


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

你好謝謝你解答,我把編譯模式改成UNICODE后,原來的錯誤確實沒有了,但是心的錯誤馬上又來了,一下增加到20幾條,哎,wince下移植看來需要改動的地方很多啊,我想用你們的硬件開發(fā)產(chǎn)品,軟件這一塊受局限太大了,以前主要做硬件,請多多幫助,謝謝
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樓 信息 | 搜索 | 郵箱


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

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

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


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

返回首頁

編譯通不過

用戶名:
            驗證碼: 驗證碼,看不清楚?請點擊刷新驗證碼
內(nèi)容:
主站蜘蛛池模板: 欧美成人黄色网| 欧美毛片视频| 高清一区高清二区视频| 国产欧美一区二区三区在线| 6699久久久久久久77777'7| 成年在线观看视频免费看| 国产大量情侣高清视频| 看欧美的一级毛片| 国产精品五月色六月婷婷| 欧美成人手机在线| 91亚洲人成手机在线观看| 小明成人永久免费观看视频| 亚洲制服在线观看| 国产一区二区三区四| 黄a视频| 成视频年人黄网站免费视频 | 国产成人毛片精品不卡在线| 国产91小视频| 免费污污网站| 亚洲欧洲精品成人久久曰影片| www.你懂的.com| 日韩专区在线| 四虎永久免费地址ww 41.6| 成人中文字幕在线| 我想看黄色毛片| 国产成人a毛片| 国产麻豆精品hdvideoss| 桃色婷婷| 美国美女一级片| 特级全黄一级毛片免费| 黄色成人毛片| 福利国产精品| 国产精品视频免费| 国产欧美视频在线| 精品久久香蕉国产线看观看亚洲| 欧美αv日韩αv另类综合| 日韩三级一区二区| 亚洲一区免费在线| 一级毛片真人不卡免费播| 久久99精品国产| 内地精品露脸自拍视频香蕉|