error C2065: “uint8_t”: 未声明的标识符

转载:https://blog.csdn.net/lys07962000/article/details/12052571

参考:
http://blog.csdn.net/chenxin_130/article/details/8580706

该错误由于uint32_t与uint8_t未定义造成,加入定义后编译成功。

#if _MSC_VER < 1600 // Visual Studio 2008 and older doesn't have stdint.h... 

typedef __int64 int64_t; 

typedef unsigned __int64 uint64_t; 

typedef unsigned __int32 uint32_t; 

typedef unsigned __int16 uint16_t; 

typedef unsigned __int8 uint8_t; 

#else  #include <stdint.h>  // 2010之前的版本的安装目录下没有该文件,

#endif  vs2010添加 stdint.h 就可以


VC2008 error :uint8_t , uint16_t ……未能识别,没有定义

原文地址:https://www.cnblogs.com/MCSFX/p/12664129.html