Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/162.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Boost 1.66.0:找不到Boost库:Boost\u系统、Boost\u文件系统、Boost\u线程、Boost\u日期\u时间_C++_Windows_Boost_Cmake - Fatal编程技术网

C++ Boost 1.66.0:找不到Boost库:Boost\u系统、Boost\u文件系统、Boost\u线程、Boost\u日期\u时间

C++ Boost 1.66.0:找不到Boost库:Boost\u系统、Boost\u文件系统、Boost\u线程、Boost\u日期\u时间,c++,windows,boost,cmake,C++,Windows,Boost,Cmake,我的配置是: 操作系统:Windows 10 x64 升幅:1.66.0 CMake:3.10 Visual Studio:2017 我是这样编译boost的: bootstrap .\b2 --build-dir=build toolset=msvc address-model=64 --build-type=complete stage 运行CMake时,我遇到以下错误: could not find boost libraries: boost_system boost_file

我的配置是:

  • 操作系统:Windows 10 x64
  • 升幅:1.66.0
  • CMake:3.10
  • Visual Studio:2017
我是这样编译boost的:

bootstrap 
.\b2 --build-dir=build toolset=msvc address-model=64 --build-type=complete stage
运行CMake时,我遇到以下错误:

could not find boost libraries: 
boost_system
boost_filesystem
boost_thread
boost_locale
boost_date_time
我搜索这些库,它们位于stage文件夹中。
我尝试了
BOOST\u USE\u STATIC\u LIBS=ON
,但什么也没发生。

在运行cmake之前手动设置
BOOST\u INCLUDEDIR
BOOST\u LIBRARYDIR
,例如

set BOOST_INCLUDEDIR=C:\boost\src\boost_1_59_0
set BOOST_LIBRARYDIR=C:\boost\boost_1_59_0-bin-msvc-all-32-64\boost_1_59_0\lib32-msvc-14.0

请参见1.66.0版更改的Boost库命名方案。添加了一个额外的体系结构中缀,您正在使用的cmake版本3.10的FindBoost.cmake不知道该中缀。尝试使用1.65.1版,并将BOOST_ROOT设置为BOOST安装的路径。

即使是CMake的Git master的可能副本也不支持Boobst 1.66。我尝试使用1.65.1版,但无法编译BOOST库:未知编译器version@Ammoun首先尝试使用编译器版本中的预构建二进制文件Visual Studio 2017的版本是14.1,因此您需要获取文件
boost_1_65_1-msvc-14.1-64.exe
,但对于预构建的二进制文件,我必须输入以下命令:。\b2--build dir=build toolset=msvc address model=64--build type=complete lib64-msvc-14。1@Ammoun不,这是Boost的构建步骤。您只需在CMakeLists.txt中调用find_包,并在命令行之前或命令行上设置BOOST_ROOT。这是没有希望的,CMake还不支持BOOST 1.66。