【发布时间】:2018-06-25 14:03:34
【问题描述】:
我正在为 appveyor 编写脚本。 我需要在我的 c++ 项目中使用 boost 库。 在我的 appveyor 脚本中,我写了以下几行:
set INCLUDE=C:\Libraries\boost_1_67_0;%INCLUDE%
cd C:\Libraries\boost_1_67_0
dir
.\bootstrap.bat
.\b2 --with-iostreams runtime-link=static --build-type=complete
set LIB=C:\Libraries\boost_1_67_0\stage\lib;%LIB%
但这会在.\bootstrap.bat 上给出错误
.\bootstrap.bat
Building Boost.Build engine
Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.
Command exited with code 1
你可以在https://ci.appveyor.com/project/srbcheema1/vcf-demo/build/1.0.32找到appveyor的日志
我的 CMakeLists.txt 是这样的:
cmake_minimum_required (VERSION 2.8.9)
project (reader-demo CXX C)
set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build" FORCE)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(Boost_USE_STATIC_LIBS ON)
add_executable(reader uncompress.cpp)
如何在 appveyor 中使用 boost 库?
【问题讨论】: