0

I am writing about a problem I am having trying to get a third-party library to build with mingw32-make.exe and a Boost 1.67.0 dependency on Windows 10.

I am setting the variable Boost_INCLUDE_DIR to <path_to_boost>\boost_1_67_0\include

I am setting the variable Boost_LIBRARY_DIR to <path_to_boost>\boost_1_67_0\lib

and the cmake-gui output comes out with the following error message:

Error Message Describing missing thread_win32 library

because, I imagine, I do not have the libboost_thread_win32.a library included in my boost installation (shown below).

Libraries included in my boost installation

How do I resolve this? Is there a way to easily build boost with this thread_win32 library using minGW?

Zoe
  • 27,060
  • 21
  • 118
  • 148
Zach S
  • 11
  • 2
  • that actually looks like a CMake Bug. you could try removing the "1.58" version requirement from `find_package("Boost", "1.58")` in UHDBoost.cmake line 176 – Marcus Müller Jul 08 '21 at 22:57
  • that's why I said, "looks like a CMake bug" – Marcus Müller Jul 09 '21 at 13:15
  • If I modify FindPackageHandleStandardArgs.cmake to ignore the error, then I get an error further down the line... "Cmake Error at cmake/Modules/UHDComponent.cmake:59 (message): Dependencies for required component LibUHD not met. Call Stack (most recent call first): CMakeLists.txt:363 (LIBUHD_REGISTER_COMPONENT)" So it looks like boost thread_win32 library built with mingw32 might be essential? – Zach S Jul 09 '21 at 14:55

1 Answers1

0

To build boost 1.67.0 on Windows for cmake you need to set the variables:

  • BOOST_ROOT to <path_to_boost>\boost_1_67_0
  • and BOOST_LIBRARY_DIR to the path where you have built boost.
    E.g. <path_to_boost>\boost_1_67_0\stage if you follow the instructions here
kenba
  • 4,303
  • 1
  • 23
  • 40