error C2039: “int_least8_t”: 不是“`global namespace'”的成员

在向H.265的测试软件HM16.0中配置boost的时候,发现 include <boost/cstdint.hpp>的时候总是会报错:

错误 11 error C2039: “int_fast16_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 115 1 TAppEncoder
错误 19 error C2039: “int_fast32_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 122 1 TAppEncoder
错误 27 error C2039: “int_fast64_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 131 1 TAppEncoder
错误 3 error C2039: “int_fast8_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 108 1 TAppEncoder
错误 9 error C2039: “int_least16_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 114 1 TAppEncoder
错误 17 error C2039: “int_least32_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 121 1 TAppEncoder
错误 25 error C2039: “int_least64_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 130 1 TAppEncoder
错误 1 error C2039: “int_least8_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 107 1 TAppEncoder
错误 33 error C2039: “intmax_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 138 1 TAppEncoder
错误 15 error C2039: “uint_fast16_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 118 1 TAppEncoder
错误 23 error C2039: “uint_fast32_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 125 1 TAppEncoder
错误 31 error C2039: “uint_fast64_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 134 1 TAppEncoder
错误 7 error C2039: “uint_fast8_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 111 1 TAppEncoder
错误 13 error C2039: “uint_least16_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 117 1 TAppEncoder
错误 21 error C2039: “uint_least32_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 124 1 TAppEncoder
错误 29 error C2039: “uint_least64_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 133 1 TAppEncoder
错误 5 error C2039: “uint_least8_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 110 1 TAppEncoder
错误 35 error C2039: “uintmax_t”: 不是“`global namespace'”的成员 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 139 1 TAppEncoder
错误 12 error C2873: “int_fast16_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 115 1 TAppEncoder
错误 20 error C2873: “int_fast32_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 122 1 TAppEncoder
错误 28 error C2873: “int_fast64_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 131 1 TAppEncoder
错误 4 error C2873: “int_fast8_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 108 1 TAppEncoder
错误 10 error C2873: “int_least16_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 114 1 TAppEncoder
错误 18 error C2873: “int_least32_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 121 1 TAppEncoder
错误 26 error C2873: “int_least64_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 130 1 TAppEncoder
错误 2 error C2873: “int_least8_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 107 1 TAppEncoder
错误 34 error C2873: “intmax_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 138 1 TAppEncoder
错误 16 error C2873: “uint_fast16_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 118 1 TAppEncoder
错误 24 error C2873: “uint_fast32_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 125 1 TAppEncoder
错误 32 error C2873: “uint_fast64_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 134 1 TAppEncoder
错误 8 error C2873: “uint_fast8_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 111 1 TAppEncoder
错误 14 error C2873: “uint_least16_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 117 1 TAppEncoder
错误 22 error C2873: “uint_least32_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 124 1 TAppEncoder
错误 30 error C2873: “uint_least64_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 133 1 TAppEncoder
错误 6 error C2873: “uint_least8_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 110 1 TAppEncoder
错误 36 error C2873: “uintmax_t”: 符号不能用在 using 声明中 D:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 139 1 TAppEncoder
42 IntelliSense:  全局范围没有 "int_fast16_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 115 11 TAppEncoder
46 IntelliSense:  全局范围没有 "int_fast32_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 122 11 TAppEncoder
50 IntelliSense:  全局范围没有 "int_fast64_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 131 11 TAppEncoder
38 IntelliSense:  全局范围没有 "int_fast8_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 108 11 TAppEncoder
41 IntelliSense:  全局范围没有 "int_least16_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 114 11 TAppEncoder
45 IntelliSense:  全局范围没有 "int_least32_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 121 11 TAppEncoder
49 IntelliSense:  全局范围没有 "int_least64_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 130 11 TAppEncoder
37 IntelliSense:  全局范围没有 "int_least8_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 107 11 TAppEncoder
53 IntelliSense:  全局范围没有 "intmax_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 138 11 TAppEncoder
44 IntelliSense:  全局范围没有 "uint_fast16_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 118 11 TAppEncoder
48 IntelliSense:  全局范围没有 "uint_fast32_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 125 11 TAppEncoder
52 IntelliSense:  全局范围没有 "uint_fast64_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 134 11 TAppEncoder
40 IntelliSense:  全局范围没有 "uint_fast8_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 111 11 TAppEncoder
43 IntelliSense:  全局范围没有 "uint_least16_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 117 11 TAppEncoder
47 IntelliSense:  全局范围没有 "uint_least32_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 124 11 TAppEncoder
51 IntelliSense:  全局范围没有 "uint_least64_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 133 11 TAppEncoder
39 IntelliSense:  全局范围没有 "uint_least8_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 110 11 TAppEncoder

54 IntelliSense:  全局范围没有 "uintmax_t" d:\Program Files\Caffe\VSContact\boost_1_58_0\boost\cstdint.hpp 139 11 TAppEncoder


后来发现,int_fast16_t等变量是在 stdint.h 文件中定义的,而HM16.0使用的stdint.h文件不是VS自带库里的文件,而是工程下 compat/msvc下的stdint.h文件,发现这个文件并没有定义int_fast16_t等变量。

解决方法就是把VS自带的stdint.h文件代替compat/msvc下的stdint.h文件就可以了。

我的VS自带的cstdint.h路径在: D:/Program Files/Microsoft Visual Studio 12.0/VC/include/stdint.h


  • 16
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值