200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 未定义标识符 “uint“ “uint8_t” 解决

未定义标识符 “uint“ “uint8_t” 解决

时间:2019-10-15 09:54:41

相关推荐

未定义标识符 “uint“ “uint8_t” 解决

windows系统解决方法:

添加头文件:

#include <wtypes.h>#define ulong ULONG #define uint UINT

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

参考: /chenxin_130/article/details/8580706

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

#if _MSC_VER < 1600 // Visual Studio 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> // 之前的版本的安装目录下没有该文件,

#endif

visual studio中,添加 stdint.h 就可以

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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。