首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

WinPcap捕获数据包程序异常error C2144: syntax error : missing '' before type &#x

2013-04-05 
WinPcap捕获数据包程序错误error C2144: syntax error : missing '' before type 'unsign

WinPcap捕获数据包程序错误error C2144: syntax error : missing ';' before type 'unsigned in
[size=16px][size=11px]f:\wpdpack_4_1_2\wpdpack\include\pcap-stdinc.h(79) : error C2144: syntax error : missing ';' before type 'unsigned int'
f:\wpdpack_4_1_2\wpdpack\include\pcap-stdinc.h(79) : fatal error C1004: unexpected end of file found[/size][/size]

出现错误的头文件pcap-stdinc.h

#define SIZEOF_CHAR 1
#define SIZEOF_SHORT 2
#define SIZEOF_INT 4
#ifndef _MSC_EXTENSIONS
#define SIZEOF_LONG_LONG 8
#endif

/*
 * Avoids a compiler warning in case this was already defined      
 * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
 * to prevent it from including 'winsock.h')
 */
#ifdef _WINSOCKAPI_
#undef _WINSOCKAPI_
#endif
#include <winsock2.h>

#include <fcntl.h>

#include "bittypes.h"
#include <time.h>
#include <io.h>

#ifndef __MINGW32__
#include "IP6_misc.h"
#endif

#define caddr_t char*

#if _MSC_VER < 1500
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define strdup _strdup
#endif

#define inline __inline 

#ifdef __MINGW32__
#include <stdint.h>
#else /*__MINGW32__*/
/* MSVC compiler */
#ifndef _UINTPTR_T_DEFINED
#ifdef  _WIN64
typedef unsigned __int64    uintptr_t;
#else
typedef _W64 unsigned int   uintptr_t;
#endif这一行是出现错误的
#define _UINTPTR_T_DEFINED
#endif

#ifndef _INTPTR_T_DEFINED
#ifdef  _WIN64
typedef __int64    intptr_t;
#else
typedef _W64 int   intptr_t;
#endif
#define _INTPTR_T_DEFINED
#endif

#endif /*__MINGW32__*/

这个头文件是间接调用的

搞不懂啊,看到好多类似的帖子方法也尝试了,还是不行啊
[解决办法]
看到有帖子说vc的sdk太老
对64位的支持不是很好,,要么你装上psdk,要不就直接装上VS2010吧
[解决办法]
确实是啊,vc6.0不行,搞不懂,用VS2008就没有这样的错误了

热点排行