c++ - UINT64 不是 boost 的成员

标签 c++ visual-studio-2012 boost

我在 VS2012 下使用 boost 1_62_0 编译我们的一个程序时遇到了一些问题。我相信我以前曾在 VS2015 下进行过此编译(但无法验证这一点)。

我打开了 /showIncludes 来了解它到底在哪里有问题,我已经将它缩小到包含 VS2012 中的 typeindex 包括:

Note: including file:          C:\PROGRA~2\MICROS~3.0\VC\include\crtdefs.h^M
Note: including file:        \\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/limits.hpp^M
Note: including file:       \\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/limits.hpp^M
Note: including file:       \\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/type_traits/is_enum.hpp^M
Note: including file:       \\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/type_traits/is_integral.hpp^M
Note: including file:       \\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/utility/enable_if.hpp^M
Note: including file:       \\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/cstdint.hpp^M
Note: including file:       C:\PROGRA~2\MICROS~3.0\VC\include\typeindex^M
\\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/functional/hash/hash.hpp(236) : error C2039: 'UINT64' : is not a member of 'boost'^M
\\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/functional/hash/hash.hpp(237) : error C2039: 'UINT64' : is not a member of 'boost'^M
Note: including file:       \\COMPILESERVER\BASENT\dev\lib\src\third_party\boost\boost_latest_win64_vs2012\boost/functional/hash/extensions.hpp^M

使用#pragma message,我可以验证它是否在 cstdint.hpp 的 boost 命名空间内 using::uint64_t

关于如何解决这个问题有什么想法吗?

最佳答案

确实,这闻起来像一个 MACRO。

你应该找出哪个 header 定义了类似的东西

#define uint64_t UINT64

您可以保存失败翻译单元的预处理器输出以找到它。

关于c++ - UINT64 不是 boost 的成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40735850/

相关文章:

c++ - 如何使用mongodb的c++驱动程序构建程序?

c++ - Visual Studio 2012 中的 OpenGL 未解析的外部符号 _gluLookAt@72 和 _gluPerspective@32

c++ - 字符串操作和奇怪的结果

c++ - Boost变体模糊构造

c++ - C++11 和 C++17 基于范围的 For 循环是否可以迭代到特定位置而不是 map 的整个范围?

c++ - 使用不同/未知类型的类模板初始化 vector

c++ - Boost 变体类型上的调度需要线性时间吗?

c++ - 使用 Boost Python 有条件地添加模块

c++ - 删除 boost::interprocess::named_mutex 的问题

c++ - CodeBlocks C++ 输出文件