CMake error: Imported targets not available for Boost version 106300
CMake error: Imported targets not available for Boost version 106300
我正在尝试在位于以下位置的 boost 库中使用 uint512_t:
multiprecision/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'
我不知道是什么问题。我什至包括:
"boost/multiprecision/cpp_int.hpp"
在 main.cpp 中保持其他一切不变,所需要的只是:
using namespace boost::multiprecision
我正在尝试在位于以下位置的 boost 库中使用 uint512_t:
multiprecision/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'
我不知道是什么问题。我什至包括:
"boost/multiprecision/cpp_int.hpp"
在 main.cpp 中保持其他一切不变,所需要的只是:
using namespace boost::multiprecision