Could NOT find Boost (missing: thread system iostreams) (found suitable version "1.74.0", minimum required is "1.67.0")
Closed this issue · 1 comments
Domigome commented
Hi there,
Trying to build con Windows 10 64 bits with Boost 1.74.0 I get this error from Cmake.
Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
The C compiler identification is MSVC 19.16.27044.0
The CXX compiler identification is MSVC 19.16.27044.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE
CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: thread system iostreams) (found suitable
version "1.74.0", minimum required is "1.67.0")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.21/Modules/FindBoost.cmake:2345 (find_package_handle_standard_args)
CMakeLists.txt:40 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/USER/Downloads/cpp-redis-header/redis-cpp/buildclean/CMakeFiles/CMakeOutput.log".
See also "C:/Users/USER/Downloads/cpp-redis-header/redis-cpp/buildclean/CMakeFiles/CMakeError.log".
I have also try to manually set the path with:
set(BOOST_ROOT "C:/local/boost_1_74_0")
set(Boost_INCLUDE_DIR "C:/local/boost_1_74_0")
set(Boost_LIBRARY_DIR "C:/local/boost_1_74_0/libs")
But still same error.
Also tried with set(Boost_USE_STATIC_LIBS ON) and same error persist.
No luck, hope someone can give me a lead.
Domigome commented
Issue solve, the c++11 branch is missing linking the boost libraries in:
target_link_libraries (${PROJECT_LC} ${LIBRARIES} Boost::thread Boost::system Boost::iostreams)