【Boost库初探】Boost库编译后命名方式
2015-01-19 20:16
302 查看
Boost库编译后命名方式
from http://www.cnblogs.com/dementia/archive/2009/04/10/1433217.html Boost官网的《Geting Started On Windows》(http://www.boost.org/doc/libs/1_38_0/more/getting_started/windows.html)提到了Boost库的命名,摘录如下:以 libboost_regex-vc71-mt-d-1_34.lib 为例:lib 前缀:除了Microsoft Windows之外,每一个Boost库的名字都以此字符串开始。在Windows上,只有普通的静态库使用lib前缀;导入库和DLL不使用。boost_regex 库名称:所有boost库名文件以boost_开头。-vc71 Toolset 标记:标识了构建该库所用的toolset和版本。-mt Threading 标记:标识构建该库启用了多线程支持。不支持多线程的库没有-mt。-d ABI标记:编码了影响库和其他编译代码交互的细节。对于每一种特性,向标记中添加一个字母:Key | Use this library when: |
s | 静态链接到C++标准库和编译器运行时支撑库 |
g | 使用标准库和运行时支撑库的调试版本 |
y | 使用Python的特殊调试构建 |
d | 构建代码的调试版本 |
p | 使用STLPort标准库而不是编译器提供的默认库 |
n | 使用STLPort已被弃用的“native iostreams” |
文件名 | 含义 | 编译使用该库的程序时应使用的编译选项 |
libboost_regex-vc90-mt-sgd-1_38.lib | 静态库,多线程,调试版本 使用静态调试版本C运行时库(LIBCMTD.LIB和LIBCPMTD.LIB) | /MTd |
libboost_regex-vc90-mt-s-1_38.lib | 静态库,多线程 使用静态版本C运行时库(LIBCMT.LIB和LIBCPMT.LIB) | /MT |
libboost_regex-vc90-mt-gd-1_38.lib | 静态库,多线程,调试版本 使用动态调试版本C运行时库(MSVCRTD.LIB和MSVCPRTD.LIB) | /MDd |
libboost_regex-vc90-mt-1_38.lib | 静态库,多线程 使用动态版本C运行时库(MSVCRT.LIB和MSVCPRT.LIB) | /MD |
boost_regex-vc90-mt-gd-1_38.lib | 导入库(boost_regex-vc90-mt-gd-1_38.dll),多线程,调试版本 | |
boost_regex-vc90-mt-1_38.lib | 导入库(boost_regex-vc90-mt-1_38.dll)多线程 |
Build boost-iostreams with zlib
from http://slimemeteor.blogspot.com/2010/09/boost-lib-build-with-zlib-for-iostream.html and http://tlzprgmr.wordpress.com/2010/03/17/building-boost-1-42-with-zlib-1-2-4-support/[/code] 【步骤】建立E:\dev\boost\build,存放build时的中间文件>cd E:\dev\boost\1_39E:\dev\boost\1_39>%comspec% /k ""D:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x86(如果是x64,执行%comspec% /k ""D:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x64)E:\dev\boost\1_39>E:\dev\boost\1_39\bjam.exe --build-dir="E:\dev\boost\build" --toolset=msvc-8.0 -sNO_ZLIB=0 -sZLIB_SOURCE="E:\dev\tools\zlib\1.2.5" --with-iostreams --build-type=complete stage如果遇到boost提示gzio.c文件找不到的错误,(参照这里http://tlzprgmr.wordpress.com/2010/03/17/building-boost-1-42-with-zlib-1-2-4-support/)解决方法如下:把E:\dev\boost\1_39\libs\iostreams\build\Jamfile.v2里的这一行(搜索gzio,只有一处) crc32 deflate gzio infback inffast inflate inftrees trees uncomprzutil :中的gzio删去,即:crc32 deflate infback inffast inflate inftrees trees uncompr zutil :再次执行【步骤】里的命令.build后会在E:\dev\boost\build\boost\bin.v2\libs\iostreams\build下生成:boost_iostreams-vc80-mt-1_39.libboost_iostreams-vc80-mt-gd-1_39.libboost_zlib-vc80-mt-1_39.libboost_zlib-vc80-mt-gd-1_39.liblibboost_iostreams-vc80-mt-1_39.liblibboost_iostreams-vc80-mt-gd-1_39.liblibboost_iostreams-vc80-mt-s-1_39.liblibboost_iostreams-vc80-mt-sgd-1_39.liblibboost_iostreams-vc80-s-1_39.liblibboost_iostreams-vc80-sgd-1_39.liblibboost_zlib-vc80-mt-1_39.liblibboost_zlib-vc80-mt-gd-1_39.liblibboost_zlib-vc80-mt-s-1_39.liblibboost_zlib-vc80-mt-sgd-1_39.liblibboost_zlib-vc80-s-1_39.liblibboost_zlib-vc80-sgd-1_39.lib同时这些文件会拷贝到 E:\dev\boost\1_39\stage\lib(END)Howto get Boost libraries binaries that work with Visual Studio?
(http://stackoverflow.com/questions/2049952/how-to-get-boost-libraries-binaries-that-work-with-visual-studio)There are three different options for accessing the binary libraries:1) Build them from source. Go into the boost directory and run:bootstrap.\bjamOr get more complicate and do something like:bjam --stagedir="c:\Program Files\Boost"--build-type=complete --toolset=msvc-9.0--with-regex --with-date_time --with-thread --with-signals --with-system --with-filesystem --with-program_options stage2) Use the BoostPro installer (http://www.boostpro.com/download)to get the specific libraries that you need.This is very nice because it only downloads and installs the files that you say you want. However, it never has the most current version available, and there are no 64 bit binaries.3) Download the entire set of libraries (http://boost.teeks99.com)Easy to use, simple to do, but the libraries are huge (7GB unzipped!).Edit 2013-05-13: My builds are now available (starting from 1.53) directly from the sourceforge page.转自:http://www.cnblogs.com/yaoyansi/articles/1864702.html
相关文章推荐
- [Z]Boost库编译后命名方式
- Boost库编译后命名方式
- Boost库编译后命名方式
- Boost库编译后命名方式
- Boost库编译后命名方式
- 编译后的boost库命名方式
- (转)Boost库编译后命名方式
- [转]Boost库编译后命名方式
- Boost库编译后命名方式
- Boost库编译后命名方式
- Boost库编译后命名方式
- Boost库编译后命名方式
- [转]Boost库编译后命名方式
- Boost库的命名规则及静态编译命令。
- 【Boost库初探】Boost.Regex库编译、使用(32位/64位)
- 编译链接到Boost及Boost库命名规则
- boost库生成文件命名和编译(转载)
- xcode 编译 带boost库程序的 一类错误及其解决方式
- Boost库的命名规则及静态编译命令。
- boost库生成文件命名和编译