为 MSVC 预构建的 Boost 1.37
我找不到 Boost 1.37.0 的一组预构建的 MSVC++ 库,只有源代码。 我不明白他们奇怪的构建系统是如何工作的...有什么地方可以找到视觉工作室项目或其他东西的下载吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我找不到 Boost 1.37.0 的一组预构建的 MSVC++ 库,只有源代码。 我不明白他们奇怪的构建系统是如何工作的...有什么地方可以找到视觉工作室项目或其他东西的下载吗?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
BoostProComputing 人员维护 Windows 的 Boost 安装程序,但他们通常需要几周时间才能发布新版本在线的。 还没到1.37。
尽管我们正在努力支持使用 CMake 构建 Boost。 我不确定 1.37 版本进展如何,但我相信这个过程还处于早期阶段。
然而标准构建系统并没有那么奇怪! 首先下载适合您平台的 bjam(查找后缀Windows 的“ntx86”)并将其安装在路径中的某个位置(C:/Windows/System32)。 然后下载源代码,解压并运行构建系统从命令行。 对于 Visual Studio 用户来说,它看起来像这样:
这几乎是从 入门指南,其中包含更多详细信息。 如果当前目录是源的根目录,则不需要 build-dir。
等待几个小时以构建所有内容(“完成”意味着它将构建调试、发布、单/多线程、静态/动态、静态/动态链接到运行时 - 以及组合 )您最终将在“stage/lib”目录中得到所有库。
最后,您需要告诉 Visual Studio 在哪里可以找到标头和库。 转到“工具”->“选项”->“项目和解决方案”->“VC++ 目录”。 添加“包含文件”条目(如“C:\boostsource”)。 添加“库文件”条目(“C:\boostsource\stage\lib”)。
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:
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").
我的网站上有 1.37 版本(VC 7.1、8、9),请自行使用。
http://boost.teeks99.com/
(更新...1.38 也在那里)< br>
(另一个更新,1.39 现已发布)
(1.40 已上涨)
(1.41到了,有点晚了)
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)
看起来很复杂,但是构建 Boost 确实没那么糟糕。 首先你需要下载 bjam 工具(SourceForge 是一个好的来源)。 确保 bjam.exe 位于您的 PATH 中的目录中。
转到解压的 Boost 下载的根目录(例如 C:\Boost_1_37_0),
输入
bjam --help
以获取所有构建选项的列表。我使用以下命令来构建所有内容,您可以自定义它以满足您的需求:
结果将放置在 C:\boost 中,您可以删除 C:\build。
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:
The results will be placed in C:\boost and you can delete C:\build.
建造它并不困难。
他们在这里对默认流程进行了相当好的扩展:
http:// www.boost.org/doc/libs/1_37_0/more/getting_started/windows.html#or-build-binaries-from-source
下载 bjam(来自 sourceforge,有来自 boost 网站的链接)作为 boost 源,确保可以从 boost 目录访问 bjam,cd 到 boost 目录,然后运行如下所示的内容:
bjam --build-dir= --prefix-dir= --toolset=msvc --build- type=complete install
其中 是可以存储中间文件的临时目录,并且是最终安装位置。 您还可以使用各种其他选项,并非所有选项都有很好的文档记录,但基础知识相当简单。
如需更多帮助,您可以从 boost 源目录运行 bjam --help 。
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.