Boost 1.59.0, CMake 3.7.2

使用CMake编译时出现以下错误:


Error: Could not find the following Boost libraries:boost_serialization

无法找到以下库,但是编译好的库中是有libboost_serialization, libboost_system等这些文件的,就是链接不到,

因为Boost有静态和动态库,编译时两者都是需要编译的,如果按常规方法这些库就没有编译。

解决方面如下:

bjam.exe toolset=msvc-12.0 --build-type=complete address-model=64 --with-serialization --with-system --with-date_time --with-regex --with-filesystem --with-timer  --with-chrono  --with-program_options --stagedir="X:\X\Boost" stage
就是加上你所缺少的库,之后Boost\lib中就会出现 以下文件:


Error: Could not find the following Boost libraries:boost_serialization


这些就是我们所需要的文件,然后再次configure,成功!




相关文章:

  • 2021-05-17
  • 2021-09-24
  • 2021-05-03
  • 2021-08-23
  • 2021-11-02
  • 2021-09-29
  • 2021-08-24
  • 2021-09-15
猜你喜欢
  • 2022-12-23
  • 2021-12-11
  • 2021-06-02
  • 2021-07-14
  • 2021-09-20
  • 2021-06-12
  • 2022-12-23
相关资源
相似解决方案