While I am using CMake project on VisualStudio 2019 for Windows machine, I have this error when I try building my program :
fatal error LNK1104: cannot open file 'boost_unit_test_framework-vc141-mt-x64-1_66.lib'
I have set the Boost Root directory and set the Boost use static libs to ON in my CMakeLists.txt file :
set(Boost_USE_STATIC_LIBS ON)
set(BOOST_ROOT C:/boost_1_66_0)
find_package (Boost 1.66.0 COMPONENTS system filesystem unit_test_framework REQUIRED)
As described here : lib_prefix
I can see that static library on Windows begin with lib
prefix so
the error is complaining about the dynamic library which I don't have in my library directory and I don't want to use it.
On another hand, as described in the link also, for the toolset tag, which identifies the toolset and version used to build the binary, my error is complaining about -vc141
, but I compiled my library with -vc142
toolset and that what I can find in my library directory.
I am certainly able to download a pre-compiled dynamic 14.1 Library version but I don't want to use it!
I don't know why CMake giving me this error, and how can I fix it, please? Thank you