1

I'd like to use the multiprecision library, but i'm having problems including the header filer.

CMakeLists:

include(ExternalProject)
cmake_minimum_required(VERSION 3.10)

# if no cdt root is given use default path
if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT)
   find_package(eosio.cdt)
endif()

ExternalProject_Add(
   chintaidex_project
   SOURCE_DIR ${CMAKE_SOURCE_DIR}/src
   BINARY_DIR ${CMAKE_BINARY_DIR}/chintaidex
   CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake -I=$(BOOST_DIR)/include/
   UPDATE_COMMAND ""
   PATCH_COMMAND ""
   TEST_COMMAND ""
   INSTALL_COMMAND ""
   BUILD_ALWAYS 1
)
0

Your CMakeLists file in the base folder should not be changed. But rather in the src folder CMakeList you should add the following line:

target_include_directories( mycontract PUBLIC "$ENV{BOOST_DIR}/include" )

Where BOOST_DIR is an environmental variable pointing to your boost folder. On my computer it is: /home/eosio/1.8/src/boost_1_70_0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.