# ------------------- # MSVC configuration. # -------------------
# Configure msvc (default version, searched for in standard locations and PATH). # using msvc ;
# Configure specific msvc version (searched for in standard locations and PATH). # using msvc : 8.0 ;
#在这里添加 vs2008 的配置
using msvc : 9.0 : : /wd4819 /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 ; #在这里添加 vs2005 的配置
using msvc : 8.0 : :
6.进入F:/Develop/boost_1_37_0 C++/boost_1_37_0 目录 7.执行bjam.exe 编译命令 //下面的命令的各选项的说明:
//prefix 将boost安装到的路径(生成的头文件和库文件都会放到该路径中)。 //重定义以下变量(利用-s设置):
//VC80_ROOT vc2005的安装路径,如果未将vc2005安装到默认位置,你必须指定该项。
//TOOLS 使用的编译工具,vc2005对应的是vc-8_0
//PYTHON_ROOT python的安装目录,如果未将BOOST安装到默认位置,你必须指定该项。
//BUILD 编译结果选项,默认会生成尽可能多的版本,如调试版/发行版,静态库/动态库,单线程/多线程。 bjam 命令说明
Boost.Build V2 (Milestone 12) Boost.Jam 03.1.16 Project-specific help: Project has jamfile at Jamroot Usage:
bjam [options] [properties] [install|stage] Builds and installs Boost. Targets and Related Options:
install Install headers and compiled library files to the ======= configured locations (below).
--prefix=
Default; /usr/local on Unix. Linux, etc.
--exec-prefix=
--includedir=
stage Build and install only compiled library files ===== to the stage directory.
--stagedir=
--build-type=
complete - Attempts to build all possible variations.
--build-dir=DIR Build in this location instead of building within the distribution tree. Recommended! --show-libraries Displays the list of Boost libraries that require build and installation steps, then exit.
--layout=
versioned (default) - Names of boost binaries include the Boost version number and the name and version of the compiler. Boost headers are installed in a subdirectory of
system - Binaries names do not include the Boost version number or the name and version number of the compiler. Boost headers are installed directly
into
--with-
toolset=toolset Indicates the toolset to build with. variant=debug|release Select the build variant
link=static|shared Whether to build static or shared libraries threading=single|multi Whether to build single or multithreaded binaries runtime-link=static|shared
Whether to link to static or shared C and C++ runtime. Configuration help:
Configuration file at F:/Develop/boost_1_37_0 C++/boost_1_37_0/tools/build/v2 user-config.jam
This file is used to configure your Boost.Build installation. You can modify this file in place, or you can place it in a permanent location so that it does not get overwritten should you get a new version of Boost.Build. See: http://boost.org/boost-build2/doc/html/bbv2/reference.html#bbv2.reference.init
for documentation about possible permanent locations. General command line usage: bjam [options] [properties] [targets]
Options, properties and targets can be specified in any order.
Important Options:
* --clean Remove targets instead of building * -a Rebuild everything
* -n Don't execute the commands, only print them * -d+2 Show commands as they are executed * -d0 Supress all informational messages * -q Stop at first error
* --debug-configuration Diagnose configuration
* --debug-building Report which targets are built with what properties * --debug-generator Diagnose generator search/execution Further Help:
The following options can be used to obtain additional documentation. * --help-options Print more obscure command line options. * --help-internal Boost.Build implementation details. * --help-doc-options Implementation details doc formatting. 8.我的编译命令,编译所有版本.
bjam --toolset=msvc-9.0 --prefix=F:/Develop/BoostLibAndDll --build-type=complete install 等待编译完成. 8.设置开发环境
打开VS2008 选择 工具->选项->vc++目录
设置包含文件目录F:/Develop/BoostlibAndDll/include/boost-1_37/boost