我有一个头文件,其中包含我尝试与之通信的设备的某些API的功能定义。我在eclipse juno中创建了一个c ++项目,并将头文件复制到该项目中。当我打开头文件时,我看到一个奇怪的语法错误。头文件是这样的:
#ifndef AnaGate_h
#define AnaGate_h
// platform-independent fixed-size integer types
#ifdef WIN32
typedef signed __int8 AnaInt8;
typedef signed __int16 AnaInt16;
typedef signed __int32 AnaInt32;
typedef signed __int64 AnaInt64;
typedef unsigned __int8 AnaUInt8;
typedef unsigned __int16 AnaUInt16;
typedef unsigned __int32 AnaUInt32;
typedef unsigned __int64 AnaUInt64;
#else
// C99 standard header, may not be included with all (especially older) compilers.
#include <stdint.h>
typedef int8_t AnaInt8;
typedef int16_t AnaInt16;
typedef int32_t AnaInt32;
typedef int64_t AnaInt64;
typedef uint8_t AnaUInt8;
typedef uint16_t AnaUInt16;
typedef uint32_t AnaUInt32;
typedef uint64_t AnaUInt64;
#endif
语法错误适用于第5-12行。 (从typedef签名__int8 AnaInt8开始)。我无法理解为什么语法错误。任何帮助都非常适合