【问题标题】:Failed to build boost 1.64.0 b2.exe Visual Studio 2017无法构建 boost 1.64.0 b2.exe Visual Studio 2017
【发布时间】:2017-07-08 18:42:57
【问题描述】:

我按照这些说明进行操作

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

用于在 Windows 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 似乎运行良好。

我第一次运行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.

有经验的人能解释一下这里的所有否吗?它还给出了一些解析错误

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,但我看不到任何文件。

【问题讨论】:

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


    【解决方案1】:

    当然……

    设置 boost_dir=C:\Program Files\boost_1_64_0

    必须有 "" 以避免中断。愚蠢的窗户。 设置 boost_dir="C:\Program Files\boost_1_64_0"

    我们开始建造!

    【讨论】:

      【解决方案2】:

      如果仍然无法构建,请右键单击并以管理员身份运行 bootstrap.bat 文件。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-05-26
        • 1970-01-01
        • 1970-01-01
        • 2018-05-18
        • 1970-01-01
        • 2018-01-04
        • 2018-03-03
        • 2018-05-25
        相关资源
        最近更新 更多