建设加速BCP [英] Building Boost BCP
问题描述
我试图建立 Boost C ++库去年两小时停止,没有任何结果。由于我是新来的C ++,我无法得到正确的构建。如何建立它正确使用Visual Studio 2008?
I was trying to build Boost C++ Libraries for last two hours and stopped without any result. Since I am new to C++, I am unable to get the build right. How can I build it correctly using Visual Studio 2008?
我需要使用BCP工具提取库的子集。所以,我需要先建立BCP,对不对?如何做到这一点?当我试图建立它,我得到了以下错误
I need to use the BCP tool to extract a subset of library. So I need to build BCP first, right? How to do this? When I tried to build it, I got the following error
*致命错误LNK1104:无法打开文件'libboost_filesystem-vc90-MT-GD-1_37.lib'*
*fatal error LNK1104: cannot open file 'libboost_filesystem-vc90-mt-gd-1_37.lib'.*
我在哪里可以得到上面给出的库文件?
Where can I get the above given library file?
推荐答案
首先,你需要有正确的路径,并留命令shell LIB环境变量。对于这一点,调用文件 vcvarsall.bat
(或类似)与参数:
First, you need to have the proper PATH, INCLUDE and LIB environment variables in your command shell. For this, call the file "vcvarsall.bat
" (or similar) with parameter:
vcvarsall.bat x86
接下来,你必须建立的bjam(您也可以从加速网页下载,但它几乎一样快)。转至工具\\果酱的\\ src
在加速和文件夹类型:
build.bat
应该产生一个子文件夹 bin.ntx86
包含bjam.exe。为方便起见,将其复制到升压主文件夹。接下来,你可以建立BCP。进入工具\\ BCP
文件夹,然后键入:
It should produce a subfolder bin.ntx86
that contains bjam.exe. For convenience, copy it to the Boost main folder. Next, you can build bcp. Go into the tools\bcp
folder and type:
..\..\bjam.exe --toolset=msvc
早在升压主文件夹,那么你可以建立任何你希望的库:
Back in the Boost main folder you can then build any library you wish:
bjam toolset=msvc –-with-{library}
其中, {库}
是建设图书馆之一。所有的可建库,可以与图所示:
where {library}
is one of the libraries to build. All buildable libraries can be shown with:
bjam –-show-libraries
有更多的bjam构建参数。关键字一些参数可以指定为:
There are many more bjam build parameters. Some parameters with keywords you can specify are:
variant=debug|release
link=shared|static
threading=multi|single
一个例子是:
bjam toolset=msvc –-with-filesystem threading=multi variant=debug stage
有关更多相关信息,请访问 Boost文档页面的。
For more infos, visit the Boost documentation pages.
编辑:更新的链接指向最近Boost文档
Updated link to point to most recent Boost documentation
编辑:修正选项--with- {}库和--show-库
Corrected options --with-{library} and –-show-libraries
这篇关于建设加速BCP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!