我试图在boost库中使用uint512_t,该库位于:
多精度/cpp_int.hpp
但是,当我试图通过CMake包含我的boost库时:
cmake_minimum_required(VERSION 3.6)
project(BoostTest)
set(CMAKE_CXX_STANDARD 11)
set(BOOSTROOT "/usr/local/Cellar/boost/1.63.0/include")
find_package(Boost REQUIRED)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIR})
endif()
include_directories(${Boost_INCLUDE_DIR})
set(SOURCE_FILES main.cpp)
add_executable(BoostTest ${SOURCE_FILES})编译时会收到以下错误消息:
error: unknown type name 'uint512_t'我不知道问题出在哪里。我甚至包括:
升压/多精度/cpp_int.hpp
发布于 2017-03-07 16:58:16
在main.cpp中保持其他一切不变,所需要的只是:
using namespace boost::multiprecisionhttps://stackoverflow.com/questions/42615046
复制相似问题