3

I am so frustrated installing boost. Yes, I did read tons of materials on the web, including the original (boost) guidelines and many similar topics on StackExchange, but it did not help. Making long story short:

  • I have VS2015 (community version)
  • boost_1_62_0 (downloaded)
  • minGW (just in case)

As normally advised, I launched the Developers Command Prompt (in order to have MS Visual Studio started) and the result was:

C:\Users\Arnold\Desktop\boost_1_62_0>bootstrap.bat
Building Boost.Build engine
'cl' is not recognized as an internal or external command,
operable program or batch file.

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case. 

Basically, it means that system cannot find a compiler. I tried to run with 'gcc' added in regular root cmd (".\bootstrap.bat gcc"), but got the same result.

My bootstrap.log file is:

###
### Using 'gcc' toolset.
###

C:\Users\Arnold\Desktop\boost_1_62_0\tools\build\src\engine>if exist bootstrap rd /S /Q bootstrap 

C:\Users\Arnold\Desktop\boost_1_62_0\tools\build\src\engine>md bootstrap 

C:\Users\Arnold\Desktop\boost_1_62_0\tools\build\src\engine>gcc -DNT -o bootstrap\jam0.exe  command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c class.c cwd.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c 

Is using VS2015 a better idea? Any clues?

UPD Content of my C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin: enter image description here

informatik01
  • 16,038
  • 10
  • 74
  • 104
Arnold Klein
  • 2,956
  • 10
  • 31
  • 60

2 Answers2

4

It looks like Visual Studio was installed without c++. See this question. Once that is installed, you need to ensure that cl is in your path, which is what vcvars32.bat is for.

Now you have decisions to make, based on your machine and development needs. Do you need 64-bit or 32-bit? Headers only, or build as well? Single-threaded or Multi-threaded? See this question for some answers.

An example for a complete 64-bit build comes from the second question above (courtesy of kayleeFrye_onDeck):

b2 -j%NUMBER_OF_PROCESSORS% toolset=msvc-14.0 --build-type=complete --libdir=C:\Boost\lib\x64 architecture=x86 address-model=64 install
Community
  • 1
  • 1
pertre
  • 266
  • 1
  • 6
3

Refer to the error message “'cl' is not recognized as an internal or external command, operable program or batch file.”, please go to the installation folder: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin and if there are the ‘vcvars32.bat’ and run it. After that, run the ‘cl.exe’ which under the same folder and check if the ‘cl’ command is available or not. If it works fine, then you can cd to the unzip folder of the boost installation, and directly run the bootstrap.bat, finally the installation is successfully as the following screenshot: enter image description here

Sara Liu - MSFT
  • 6,007
  • 1
  • 21
  • 27
  • many thanks for your reply! I could not find the file you mentioned. Please see the screenshot of the content of my VC\bin library – Arnold Klein Nov 08 '16 at 14:41