主題:[求助]EM9170在WIN7(64位)運(yùn)行的問(wèn)題 共有45249人關(guān)注過(guò)本帖 |
---|
客人 |
1樓 |
[求助]EM9170在WIN7(64位)運(yùn)行的問(wèn)題 Post By:2014-12-16 11:28:00 [只看該作者]
在WIN7(64位)安裝完VS2008以及SDK,試運(yùn)行測(cè)試軟件hello沒(méi)有問(wèn)題,但是在運(yùn)行編寫(xiě)好的代碼時(shí)出現(xiàn)報(bào)錯(cuò)(該代碼在XP系統(tǒng)以及WIN7系統(tǒng)上均可順利運(yùn)行),希望大家給予幫助,謝謝
1>------ Build started: Project: TCPpacker, Configuration: Debug EM9170 (ARMV4I) ------
1>Compiling... 1>stdafx.cpp 1>C:\Program Files (x86)\Windows CE Tools\wce600\EM9170\Include\Armv4i\winnt.h(53) : warning C4005: 'UNALIGNED' : macro redefinition 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h(588) : see previous definition of 'UNALIGNED' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(308) : error C3163: '_wcstoi64': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(685) : see declaration of '_wcstoi64' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(309) : error C3163: '_wcstoui64': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(687) : see declaration of '_wcstoui64' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(378) : error C3163: '_i64toa_s': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(466) : see declaration of '_i64toa_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(379) : error C3163: '_i64tow_s': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(679) : see declaration of '_i64tow_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(380) : error C3163: '_strtoi64': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(472) : see declaration of '_strtoi64' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(381) : error C3163: '_strtoui64': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(474) : see declaration of '_strtoui64' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(383) : error C3163: '_ui64tow_s': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(681) : see declaration of '_ui64tow_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(385) : error C3163: '_wmakepath_s': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(811) : see declaration of '_wmakepath_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(387) : error C3163: '_wsplitpath_s': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(825) : see declaration of '_wsplitpath_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(390) : error C2084: function 'errno_t wmemcpy_s(wchar_t *,rsize_t,const wchar_t *,rsize_t)' already has a body 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(1230) : see previous definition of 'wmemcpy_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(390) : error C3163: 'wmemcpy_s': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(1230) : see declaration of 'wmemcpy_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(395) : error C2084: function 'errno_t wmemmove_s(wchar_t *,rsize_t,const wchar_t *,rsize_t)' already has a body 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(1250) : see previous definition of 'wmemmove_s' 1>d:\qq文檔\369041496\filerecv\新建文件夾\tcppacker\tcppacker\altcecrt.h(395) : error C3163: 'wmemmove_s': attributes inconsistent with previous declaration 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(1250) : see declaration of 'wmemmove_s' 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>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stddef.h(54) : warning C4005: 'offsetof' : macro redefinition 1> C:\Program Files (x86)\Windows CE Tools\wce600\EM9170\Include\Armv4i\winnt.h(38) : see previous definition of 'offsetof' 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(198) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(208) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(243) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier 1>Build log was saved at "file://d:\qq文檔\369041496\FileRecv\新建文件夾\TCPpacker\TCPpacker\EM9170 (ARMV4I)\Debug\BuildLog.htm" 1>TCPpacker - 16 error(s), 2 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 0 failed, 0 skipped ========== |
|
單帖管理 | 引用 | 回復(fù) |
yy |
2樓 信息 | 搜索 | 郵箱 |
加好友 發(fā)短信 |
Post By:2014-12-16 14:33:00 [只看該作者]
我們這里也有64位WIN7的機(jī)器,開(kāi)發(fā)沒(méi)有問(wèn)題。剛剛試了下,用VS2005編譯我們的TCP的例程也是好的。
你是說(shuō)你編譯我們的hello world程序沒(méi)有錯(cuò)誤,編譯step3_tcptest程序提示了很多錯(cuò)誤?看信息TCPpacker是你自己寫(xiě)的程序?
|
單帖管理 | 引用 | 回復(fù) |
客人 |
3樓 |
Post By:2014-12-16 18:31:00 [只看該作者]
是的,程序是自己寫(xiě)的,在XP以及WIN7(32位)機(jī)器上都已經(jīng)測(cè)試過(guò)可以順利運(yùn)行,但是在64位機(jī)器上就會(huì)報(bào)錯(cuò)。
|
|
單帖管理 | 引用 | 回復(fù) |
客人 |
4樓 |
Post By:2014-12-16 18:32:00 [只看該作者]
是的,程序是自己寫(xiě)的,在XP以及WIN7(32位)機(jī)器上都已經(jīng)測(cè)試過(guò)可以順利運(yùn)行,但是在64位機(jī)器上就會(huì)報(bào)錯(cuò)。
|
|
單帖管理 | 引用 | 回復(fù) |
客人 |
5樓 |
Post By:2014-12-16 18:34:00 [只看該作者]
編譯step3_tcptest程序也沒(méi)有問(wèn)題,可以正常使用。
|
|
單帖管理 | 引用 | 回復(fù) |
yy |
6樓 信息 | 搜索 | 郵箱 |
加好友 發(fā)短信 |
Post By:2014-12-17 9:20:00 [只看該作者]
你這個(gè)問(wèn)題我懷疑是你找了個(gè)PC上的程序,然后直接換了下平臺(tái)編譯,這樣可能很多配置參數(shù),初始的宏定義沒(méi)弄對(duì),導(dǎo)致了很多錯(cuò)誤。
建議你在平臺(tái)下建新工程,然后再把代碼拷貝過(guò)來(lái),然后再調(diào)試改錯(cuò)。 如果還是有問(wèn)題,那么就一小段代碼一小段代碼添加,看看問(wèn)題出在哪。
|
單帖管理 | 引用 | 回復(fù) |
客人 |
7樓 |
Post By:2014-12-20 19:11:00 [只看該作者]
1>StdAfx.cpp 1> WINVER not defined. Defaulting to 0x0400, which is appropriate for all supported Windows CE versions 1>C:\Program Files (x86)\Windows CE Tools\wce600\EM9170\Include\Armv4i\winnt.h(53) : warning C4005: 'UNALIGNED' : macro redefinition 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h(588) : see previous definition of 'UNALIGNED' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\sal.h(214) : warning C4005: '_In_opt_z_count_' : macro redefinition 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\sal.h(186) : see previous definition of '_In_opt_z_count_' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\sal.h(216) : warning C4005: '_In_opt_z_bytecount_' : macro redefinition 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\sal.h(188) : see previous definition of '_In_opt_z_bytecount_' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\sal.h(220) : warning C4005: '_In_opt_z_count_c_' : macro redefinition 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\sal.h(192) : see previous definition of '_In_opt_z_count_c_' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\sal.h(222) : warning C4005: '_In_opt_z_bytecount_c_' : macro redefinition 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\sal.h(194) : see previous definition of '_In_opt_z_bytecount_c_' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(47) : error C2011: 'vc_attributes::YesNoMaybe' : 'enum' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(47) : see declaration of 'vc_attributes::YesNoMaybe' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(57) : error C2011: 'vc_attributes::AccessType' : 'enum' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(57) : see declaration of 'vc_attributes::AccessType' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(71) : error C2011: 'vc_attributes::Pre' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(71) : see declaration of 'vc_attributes::Pre' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(68) : error C3094: 'repeatable': anonymous usage not allowed 1> predefined C++ attributes (compiler internal)(147) : see declaration of 'repeatable' 1> attribute can only be applied to: 'class', 'struct' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(102) : error C2011: 'vc_attributes::Post' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(102) : see declaration of 'vc_attributes::Post' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(99) : error C3094: 'repeatable': anonymous usage not allowed 1> predefined C++ attributes (compiler internal)(147) : see declaration of 'repeatable' 1> attribute can only be applied to: 'class', 'struct' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(133) : error C2011: 'vc_attributes::FormatString' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(133) : see declaration of 'vc_attributes::FormatString' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(145) : error C2011: 'vc_attributes::InvalidCheck' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(145) : see declaration of 'vc_attributes::InvalidCheck' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(142) : error C3094: 'repeatable': anonymous usage not allowed 1> predefined C++ attributes (compiler internal)(147) : see declaration of 'repeatable' 1> attribute can only be applied to: 'class', 'struct' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(155) : error C2011: 'vc_attributes::Success' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(155) : see declaration of 'vc_attributes::Success' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(166) : error C2011: 'vc_attributes::PreBound' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(166) : see declaration of 'vc_attributes::PreBound' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(163) : error C3094: 'repeatable': anonymous usage not allowed 1> predefined C++ attributes (compiler internal)(147) : see declaration of 'repeatable' 1> attribute can only be applied to: 'class', 'struct' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(176) : error C2011: 'vc_attributes::PostBound' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(176) : see declaration of 'vc_attributes::PostBound' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(173) : error C3094: 'repeatable': anonymous usage not allowed 1> predefined C++ attributes (compiler internal)(147) : see declaration of 'repeatable' 1> attribute can only be applied to: 'class', 'struct' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(186) : error C2011: 'vc_attributes::PreRange' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(186) : see declaration of 'vc_attributes::PreRange' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(183) : error C3094: 'repeatable': anonymous usage not allowed 1> predefined C++ attributes (compiler internal)(147) : see declaration of 'repeatable' 1> attribute can only be applied to: 'class', 'struct' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(198) : error C2011: 'vc_attributes::PostRange' : 'struct' type redefinition 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(198) : see declaration of 'vc_attributes::PostRange' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(195) : error C3094: 'repeatable': anonymous usage not allowed 1> predefined C++ attributes (compiler internal)(147) : see declaration of 'repeatable' 1> attribute can only be applied to: 'class', 'struct' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(235) : error C2370: 'SA_Yes' : redefinition; different storage class 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(235) : see declaration of 'SA_Yes' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(236) : error C2370: 'SA_No' : redefinition; different storage class 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(236) : see declaration of 'SA_No' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(237) : error C2370: 'SA_Maybe' : redefinition; different storage class 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(237) : see declaration of 'SA_Maybe' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(240) : error C2370: 'SA_NoAccess' : redefinition; different storage class 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(240) : see declaration of 'SA_NoAccess' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(241) : error C2370: 'SA_Read' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\sal.h(2001) : warning C4005: '__checkReturn' : macro redefinition 1> C:\Program Files (x86)\Windows CE Tools\wce600\EM9170\Include\Armv4i\specstrings.h(130) : see previous definition of '__checkReturn' 1>c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\sal.h(2009) : warning C4005: '__nullnullterminated' : macro redefinition 1> C:\Program Files (x86)\Windows CE Tools\wce600\EM9170\Include\Armv4i\specstrings.h(128) : see previous definition of '__nullnullterminated' 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\altcecrt.h(390) : error C2084: function 'errno_t wmemcpy_s(wchar_t *,rsize_t,const wchar_t *,rsize_t)' already has a body 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(1230) : see previous definition of 'wmemcpy_s' 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\altcecrt.h(395) : error C2084: function 'errno_t wmemmove_s(wchar_t *,rsize_t,const wchar_t *,rsize_t)' already has a body 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(1250) : see previous definition of 'wmemmove_s' 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>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stddef.h(54) : warning C4005: 'offsetof' : macro redefinition 1> C:\Program Files (x86)\Windows CE Tools\wce600\EM9170\Include\Armv4i\winnt.h(38) : see previous definition of 'offsetof' 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(198) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(208) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier 1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(243) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier 1>Project : warning PRJ0018 : The following environment variables were not found: 以上錯(cuò)誤是直接編譯step3_tcptest程序出現(xiàn)的 |
|
單帖管理 | 引用 | 回復(fù) |
客人 |
8樓 |
Post By:2014-12-22 10:02:00 [只看該作者]
哈哈哈你編譯出來(lái)的這些報(bào)錯(cuò)信息,根本就和平臺(tái)不相關(guān),也和軟件沒(méi)半點(diǎn)關(guān)系的,肯定是你的編譯環(huán)境有問(wèn)題
|
|
單帖管理 | 引用 | 回復(fù) |
yy |
9樓 信息 | 搜索 | 郵箱 |
加好友 發(fā)短信 |
Post By:2014-12-22 10:18:00 [只看該作者]
應(yīng)該是環(huán)境問(wèn)題。
前面都是警告,第一個(gè)錯(cuò)誤是從c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(47) : error C2011: 'vc_attributes::YesNoMaybe' : 'enum' type redefinition這句開(kāi)始的。 正常情況應(yīng)該不包含sourceannotations.h這個(gè)頭文件啊?你把這個(gè)文件改個(gè)名字,看看是哪個(gè)頭文件引用的它。 [此貼子已經(jīng)被作者于2014-12-22 10:29:30編輯過(guò)]
|
單帖管理 | 引用 | 回復(fù) |