无法构建boost 1.64.0 b2.exe Visual Studio 2017

时间:2017-07-08 18:42:57

标签: c++ boost visual-studio-2017

我正在遵循这些说明

https://studiofreya.com/2017/04/23/building-boost-1-64-with-visual-studio-2017/

用于在Windows 10上构建增强功能10.这表明我们现在可以在2017年推动增强?自此question

以来的更改
    @echo off
rem Directory to boost root
set boost_dir=C:\Program Files\boost_1_64_0

rem Number of cores to use when building boost
set cores=%NUMBER_OF_PROCESSORS%

rem What toolset to use when building boost.

rem Visual Studio 2012 -> set msvcver=msvc-11.0
rem Visual Studio 2013 -> set msvcver=msvc-12.0
rem Visual Studio 2015 -> set msvcver=msvc-14.0
rem Visual Studio 2017 -> set msvcver=msvc-14.1

set msvcver=msvc-14.1

rem Start building boost
echo Building %boost_dir% with %cores% cores using toolset %msvcver%.

cd %boost_dir%
call bootstrap.bat

rem Static libraries
b2 -j%cores% toolset=%msvcver% address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/x64 
b2 -j%cores% toolset=%msvcver% address-model=32 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/win32

rem Build DLLs
rem b2 -j%cores% toolset=%msvcver% address-model=64 architecture=x86 link=shared threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/x64 
rem b2 -j%cores% toolset=%msvcver% address-model=32 architecture=x86 link=shared threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/win32

pause

在Visual Studio 2017命令行中运行。

Boostrap.bat好像运行良好。

enter image description here

我第一次运行b2.exe,只有少数成功。我可以一次又一次地看到同​​样的错误。

...failed compile-c-c++ bin.v2\libs\serialization\build\msvc-14.1\release\address-model-32\architecture-x86\link-static\threading-multi\xml_oarchive.obj...
compile-c-c++ bin.v2\libs\serialization\build\msvc-14.1\release\address-model-32\architecture-x86\link-static\threading-multi\codecvt_null.obj
Files\boost_1_64_0""=="" was unexpected at this time.

任何人都可以在这里解释所有的no吗?它还提供了一些解析错误

C:\Program Files\boost_1_64_0>b2.exe
Files\boost_1_64_0""=="" was unexpected at this time.
Files\boost_1_64_0""=="" was unexpected at this time.
Files\boost_1_64_0""=="" was unexpected at this time.
Performing configuration checks
- 32-bit                   : no  (cached)
- 64-bit                   : no  (cached)
- arm                      : no  (cached)
- mips1                    : no  (cached)
- power                    : no  (cached)
- sparc                    : no  (cached)
- x86                      : no  (cached)
- combined                 : no  (cached)

Building the Boost C++ Libraries.

- symlinks supported       : yes
- C++11 mutex              : no
- Boost.Config Feature Check: cxx11_auto_declarations : no
- Boost.Config Feature Check: cxx11_constexpr : no
- Boost.Config Feature Check: cxx11_defaulted_functions : no
- Boost.Config Feature Check: cxx11_final : no
- Boost.Config Feature Check: cxx11_hdr_mutex : no
- Boost.Config Feature Check: cxx11_hdr_tuple : no
- Boost.Config Feature Check: cxx11_lambdas : no
- Boost.Config Feature Check: cxx11_noexcept : no
- Boost.Config Feature Check: cxx11_nullptr : no
- Boost.Config Feature Check: cxx11_rvalue_references : no
- Boost.Config Feature Check: cxx11_template_aliases : no
- Boost.Config Feature Check: cxx11_thread_local : no
- Boost.Config Feature Check: cxx11_variadic_templates : no
- has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
- zlib                     : no
- bzip2                    : no
- iconv (libc)             : no
- iconv (separate)         : no
- icu                      : no
- icu (lib64)              : no
- native-atomic-int32-supported : no
- message-compiler         : no
- native-syslog-supported  : no
- pthread-supports-robust-mutexes : no
- compiler-supports-visibility : no
- gcc visibility           : no
- long double support      : no

warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)

组件配置:

- atomic                   : building
- chrono                   : building
- container                : building
- context                  : building
- coroutine                : building
- coroutine2               : building
- date_time                : building
- exception                : building
- fiber                    : building
- filesystem               : building
- graph                    : building
- graph_parallel           : building
- iostreams                : building
- locale                   : building
- log                      : building
- math                     : building
- metaparse                : building
- mpi                      : building
- program_options          : building
- python                   : building
- random                   : building
- regex                    : building
- serialization            : building
- signals                  : building
- system                   : building
- test                     : building
- thread                   : building
- timer                    : building
- type_erasure             : building
- wave                     : building

...patience...
...patience...

所有内容都应写入C:\ Program Files \ boost_1_64_0 \ stage \ win32 \ lib,但我看不到任何文件。

2 个答案:

答案 0 :(得分:1)

当然......

设置boost_dir = C:\ Program Files \ boost_1_64_0

必须有“”以避免休息。愚蠢的Windows。 设置boost_dir =“C:\ Program Files \ boost_1_64_0”

我们开始构建!

答案 1 :(得分:0)

右键单击并以管理员身份运行bootstrap.bat文件,如果该文件仍无法生成。