CMakeLists.txt:
Код: Выделить всё
cmake_minimum_required(VERSION 3.10)
project(HelloBoost)
set(CMAKE_CXX_STANDARD 20)
find_package(Boost 1.84.0 REQUIRED COMPONENTS filesystem)
link_directories(/home/vchistyakov/pt/647/output/toolchain/x86_64-pt-linux-gnu/sysroot/lib /home/vchistyakov/pt/647/output/toolchain/x86_64-pt-linux-gnu/sysroot/usr/lib)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(HelloBoost main.cpp)
target_link_libraries(HelloBoost ${Boost_LIBRARIES})
else()
message(FATAL_ERROR "Boost not found")
endif()
Код: Выделить всё
#include
#include
int main() {
boost::filesystem::path p = boost::filesystem::current_path();
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78409714/segmentation-fault-when-run-binary-compiled-with-toolchain[/url]