主题:[求助]EM9170在WIN7(64位)运行的问题 共有40561人关注过本帖 |
---|
客人 |
1楼 |
[求助]EM9170在WIN7(64位)运行的问题 Post By:2014-12-16 11:28:00 [只看该作者]
在WIN7(64位)安装完VS2008以及SDK,试运行测试软件hello没有问题,但是在运行编写好的代码时出现报错(该代码在XP系统以及WIN7系统上均可顺利运行),希望大家给予帮助,谢谢
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 ========== |
|
单帖管理 | 引用 | 回复 |
yy |
2楼 信息 | 搜索 | 邮箱 |
加好友 发短信 |
Post By:2014-12-16 14:33:00 [只看该作者]
我们这里也有64位WIN7的机器,开发没有问题。刚刚试了下,用VS2005编译我们的TCP的例程也是好的。
你是说你编译我们的hello world程序没有错误,编译step3_tcptest程序提示了很多错误?看信息TCPpacker是你自己写的程序?
|
单帖管理 | 引用 | 回复 |
客人 |
3楼 |
Post By:2014-12-16 18:31:00 [只看该作者]
是的,程序是自己写的,在XP以及WIN7(32位)机器上都已经测试过可以顺利运行,但是在64位机器上就会报错。
|
|
单帖管理 | 引用 | 回复 |
客人 |
4楼 |
Post By:2014-12-16 18:32:00 [只看该作者]
是的,程序是自己写的,在XP以及WIN7(32位)机器上都已经测试过可以顺利运行,但是在64位机器上就会报错。
|
|
单帖管理 | 引用 | 回复 |
客人 |
5楼 |
Post By:2014-12-16 18:34:00 [只看该作者]
编译step3_tcptest程序也没有问题,可以正常使用。
|
|
单帖管理 | 引用 | 回复 |
yy |
6楼 信息 | 搜索 | 邮箱 |
加好友 发短信 |
Post By:2014-12-17 9:20:00 [只看该作者]
你这个问题我怀疑是你找了个PC上的程序,然后直接换了下平台编译,这样可能很多配置参数,初始的宏定义没弄对,导致了很多错误。
建议你在平台下建新工程,然后再把代码拷贝过来,然后再调试改错。 如果还是有问题,那么就一小段代码一小段代码添加,看看问题出在哪。
|
单帖管理 | 引用 | 回复 |
客人 |
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: 以上错误是直接编译step3_tcptest程序出现的 |
|
单帖管理 | 引用 | 回复 |
客人 |
8楼 |
Post By:2014-12-22 10:02:00 [只看该作者]
哈哈哈你编译出来的这些报错信息,根本就和平台不相关,也和软件没半点关系的,肯定是你的编译环境有问题
|
|
单帖管理 | 引用 | 回复 |
yy |
9楼 信息 | 搜索 | 邮箱 |
加好友 发短信 |
Post By:2014-12-22 10:18:00 [只看该作者]
应该是环境问题。
前面都是警告,第一个错误是从c:\program files (x86)\microsoft visual studio 9.0\vc\ce\include\codeanalysis\sourceannotations.h(47) : error C2011: 'vc_attributes::YesNoMaybe' : 'enum' type redefinition这句开始的。 正常情况应该不包含sourceannotations.h这个头文件啊?你把这个文件改个名字,看看是哪个头文件引用的它。 [此贴子已经被作者于2014-12-22 10:29:30编辑过]
|
单帖管理 | 引用 | 回复 |