1

I was following these instructions

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

for building boost on windows 10. It would suggest we can now build boost with 2017? A change since this 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

Running from within Visual Studio 2017 command line.

Boostrap.bat seems to run fine.

enter image description here

The first time I ran b2.exe into, only a handful succeeded. I can see the same kinds of error again and again.

...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.

Can anyone experienced interpret all the no's here? It also gives a few parsing errors

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)

Component configuration:

- 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...

Everything should be written to C:\Program Files\boost_1_64_0\stage\win32\lib, but I see no files.

bw4sz
  • 2,237
  • 2
  • 29
  • 53

2 Answers2

2

Of course...

set boost_dir=C:\Program Files\boost_1_64_0

must have "" to avoid the break. Silly Windows. set boost_dir="C:\Program Files\boost_1_64_0"

and we start to build!

bw4sz
  • 2,237
  • 2
  • 29
  • 53
0

Right-click and run as administrator for the bootstrap.bat file if this still won't build.

Orman
  • 34
  • 3