# Help building Boost binaries...

This topic is 1110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been following the guide and I just can't figure out what's going wrong...

http://www.boost.org/doc/libs/1_57_0/more/getting_started/windows.html

I seem to need to build the binaries for date_time, so I open the command prompt and go to the boost root directory, then type bootstrap, but I get a message saying:

'yacc' is not recognized as an internal or external command, operable program or batch file.

Failed to build Boost.Build engine.

Then it gives a sourceforge message for prebuilt binaries, but before I try that... anyone have any ideas what's wrong? Isn't yacc a Unix compiler? I definitely downloaded a Windows archive... but I don't know how these things work. The Boost documentation doesn't seem to be great with this.

EDIT: I also only actually need to use date_time, so if I can avoid building everything (I see the precompiled binaries take up over 3GB...) then that would be great.

Edited by Sean_Seanston

##### Share on other sites

I've also seen this:

http://stackoverflow.com/questions/2364774/why-do-i-need-to-compile-datetime-in-boost-if-i-am-not-using-to-string-or-from-s

But when I use #define BOOST_ALL_NO_LIB, I get another error:

1>c:\program files (x86)\boost\boost_1_57_0\boost\smart_ptr\detail\yield_k.hpp(28) : fatal error C1083: Cannot open include file: 'boost/predef.h': No such file or directory

Absolutely no idea at this point...

##### Share on other sites

Aren't you supposed to type "bootstrap.bat msvc"?

Building boost is a little complicated for me personally. This is how I normally go about doing it: (notes I made for myself the last time I compiled boost. It was version 1.56)

First go to: ".\tools\build\v2\engine\"
Excute: "built.bat mingw" from the command line.
Go to ".\tools\build\v2\engine\bin.ntx86\" and copy b2.exe and bjam.exe to ".\" (the root boost directory)



It's the steps bootstrap.bat normally takes for you, but I ran into errors with bootstrap.bat in the past that I couldn't figure out, so that's why I went about it differently.

Since you are using Visual Studio, you'd probably need to do "built.bat msvc" in the second line, and "toolset=msvc" in the fourth line (just guessing!). The fourth line can also be modified to suite your tastes in how the libraries are compiled and named.

It usually takes some mucking around before I can get Boost compiled. Best of luck!

PS: It takes an hour or more to compile. You can specify just the libraries you want to build, if you don't want to compile the whole shebang.

Edited by Servant of the Lord

##### Share on other sites

Aren't you supposed to type "bootstrap.bat msvc"?

Well the documentation didn't mention anything about that... so I wouldn't be surprised if that was exactly what I was meant to do, frankly

Thanks for the info... will try all that tomorrow morning and see how I manage. Can't bear to try again this late after so much frustration, and I'd probably make a mistake somewhere in the long process.

This is the kind of thing that makes me entirely rethink my decision to make games in C++...

##### Share on other sites

This is the kind of thing that makes me entirely rethink my decision to make games in C++...

Most games don't use Boost. And since most of the generically useful portions of boost migrated into the standard libraries somewhere between TR1 and C++14, I can't really imagine what you want boost for?

##### Share on other sites
It's rather simple, albeit not documented as well as it should be for how simple it is.

The biggest pain - if you're using Visual Studio - is to make sure that cl.exe and the other build tools are in your PATH. The easiest way to do that is to open up Visual Studio and go to Tools -> Visual Studio Command Prompt.

I'm going to assume you downloaded the latest Boost and it's in C:\Source\boost_1_57_0 for exposition.

From the Visual Studio command prompt:

cd \source\boost_1_57_0
bootstrap
b2 install release
Boost will do stuff for a very long time. Then libraries and prepared headers will be in C:\Boost. Done.

##### Share on other sites

Most games don't use Boost. And since most of the generically useful portions of boost migrated into the standard libraries somewhere between TR1 and C++14, I can't really imagine what you want boost for?

Because, among other things, we just told him to. His compiler is not C++14-compliant, and Boost has a mega crapload of stuff in it that is nowhere close to being in C++, nor should it be (not because Boost is bad, but because C++ is purposefully not a kitchen-sink-included language).

Plenty of apps from small tools to big AAA engines use Boost, even if they're compiling with Visual Studio 2013 and GCC 4.8 and Clang 3.5.

##### Share on other sites

Hmm... well I decided to download Boost again, this time using the .zip instead of the recommended .7z, and now the bootstrap command is working as well as apparently the gregorian class that wouldn't work before. So hopefully I'll be able to get by without needing any binaries at all. Can't see where I could have messed anything up when I extracted to the desktop... but perhaps I did without realizing.

Seems to be working now at least...

The biggest pain - if you're using Visual Studio - is to make sure that cl.exe and the other build tools are in your PATH. The easiest way to do that is to open up Visual Studio and go to Tools -> Visual Studio Command Prompt.

Yeah, I wasn't sure about the difference between the ordinary command prompt and the VS one, but I was still getting the same results with both before.

I'll make a note of those commands in case I need them later, thanks...

BTW, is it easy to make it so it just builds a specific library? Or might it just be easier to have it do both and wait for it to finish?

##### Share on other sites

This topic is 1110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.