Boost 1.37 pre-built for MSVC

倾然丶 夕夏残阳落幕 提交于 2019-12-09 12:48:56

问题


I can't find a pre-built set of MSVC++ libs for Boost 1.37.0, only the source. I don't understand how their weird build system works... are there any places I can find a download of a visual studio project or something?


回答1:


The BoostPro Computing folks maintain the Boost installer for Windows but it usually take a few weeks for them to put new versions online. It's not yet up for 1.37.

There's no Visual Studio solution (remember, Boost targets many platforms) though there is an effort to also support building Boost with CMake. I'm not sure how far along they got for 1.37 but I believe it's still early days for this process.

However the standard build system isn't that weird! Start by downloading bjam for your platform (look for a suffix of 'ntx86' for Windows) and installing it somewhere in your path (C:/Windows/System32). Then download the source, uncompress it and run the build system from the command line. It'll look something like this for Visual Studio users:

bjam --build-dir="C:\boostsource" --toolset=msvc --build-type=complete stage

This is lifted pretty much from the Getting Started Guide which goes into much more detail. The build-dir is not needed if you're current directory is the root of the source.

After waiting a couple of hours for everything to build ('complete' means that it'll build debug, release, single/multi threaded, static/dynamic, static/dynamic linking to the runtimes - and combinations) you'll end up with all of the libs in a 'stage/lib' directory.

Finally you need to tell Visual Studio where to find the headers and libs. Go to Tools->Options->Projects and Solutions->VC++ Directories. Add an entry for "Include files" (like "C:\boostsource"). Add an entry for "Library files" ("C:\boostsource\stage\lib").




回答2:


I've got a build of 1.37 (VC 7.1, 8, 9) on my website, help yourself.

http://boost.teeks99.com/

(Update... 1.38 is up there as well)
(Another Update, 1.39 is now there)
(1.40 is up) (1.41 is up, a bit late)




回答3:


This post may help: how to install boost to the VS 2008?




回答4:


It seems complicated, but building Boost is really not that bad. First you need to download the bjam tool (SourceForge is a good source). Make sure bjam.exe is in a directory in your PATH.

Go the the root of your unzipped Boost download (e.g. C:\Boost_1_37_0)

Type bjam --help to get a list of all your build options.

I use the following command to build everything, you can customize it to suit your needs:

bjam --prefix=C:\boost --build-dir=C:\build --build-type=complete install

The results will be placed in C:\boost and you can delete C:\build.




回答5:


Building it isn't difficult. They have a fairly good expanaltion of the default process here: http://www.boost.org/doc/libs/1_37_0/more/getting_started/windows.html#or-build-binaries-from-source

Download bjam (from sourceforge, there are links from the boost website), as well as the boost sources, make sure bjam is accessible from the boost dir, cd to the boost dir, and run something like the following:

bjam --build-dir= --prefix-dir= --toolset=msvc --build-type=complete install

where is an temp dir where it can store intermediate files, and is the final install location. There are all sorts of other options you can play around with, and not all of them are documented very well, but the basics are fairly simple.

For more help, you can run bjam --help from the boost source dir.



来源:https://stackoverflow.com/questions/289909/boost-1-37-pre-built-for-msvc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!