Reputation: 2434
I am trying to use uint512_t in a boost library located in:
multiprecision/cpp_int.hpp
however, when I try to include my boost library through CMake:
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})
I receive the following error message when compiling:
error: unknown type name 'uint512_t'
I don't know what the problem is. I even included:
"boost/multiprecision/cpp_int.hpp"
Upvotes: 2
Views: 1223
Reputation: 2434
Keeping everything else the same in main.cpp, all that was needed was:
using namespace boost::multiprecision
Upvotes: 1