博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
<转>boost 1.53 and STLPort build binary for windows
阅读量:7243 次
发布时间:2019-06-29

本文共 7402 字,大约阅读时间需要 24 分钟。

 
1、编译STLPort:
    1.1 、开始菜单运行vs2008的命令行工具
    1.2、进入E:\00.CODE.SDK\STLport-5.2.1\
    1.2、运行configure msvc9
    1.3、cd E:\00.CODE.SDK\STLport-5.2.1\build\lib
    1.4、nmake -f msvc.mak clean install
    1.5、完成
2、用C++标准库STLPort编译boost
    2.0、运行boost_1_53_0\bootstrap.bat编译出boost编译工具
    2.1、修改配置文件:boostXXX\tools\build\v2\user-config.jam中变量为如下内容
        ... ...
        # Configure specific msvc version (searched for in standard locations and PATH).
           using msvc : 9.0 ;
         ... ...
       #   Configure specifying location of STLPort headers. Libraries must be either        # not needed or available to the compiler by default.
        # using stlport : : E:/00.CODE.SDK/STLport-5.2.1/src ;
 
       # Configure specifying location of both headers and libraries explicitly.        using stlport : : E:/00.CODE.SDK/STLport-5.2.1/src:E:/00.源码与SDK/STLport-5.2.1/lib ;
        ... ... 
    2.2、编译目标位VS2008全部构建集的boost库:
        b2 --target=msvc9.0 --buildset=complete --stdlib=stlport
        若找不到lib文件,x方法一个:copy stlport库文件至“C:\Program Files\Microsoft Visual Studio 9.0\VC\lib”
3、使用:
   3.1、配置预处理器选项;_STLP_DEBUG;__STL_DEBUG
图片
附录:

5倀爀攀瀀愀爀攀 to Use a Boost Library Binary

If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

5.1Install Visual Studio Binaries

The installers supplied by BoostPro Computing will download and install pre-compiled binaries into thelib\subdirectory of the boost root, typicallyC:\ProgramFiles\boost\boost_1_53_0\lib\. If you installed all variants of theBoost.Regexbinary, you're done with this step. Otherwise, please run the installer again and install them now.

skip to the next step

5.2伀爀, Simplified Build From Source

If you wish to build from source with Visual C++, you can use a simple build procedure described in this section. Open the command prompt and change your current directory to the Boost root directory. Then, type the following commands:

bootstrap.\b2

The first command prepares the Boost.Build system for use. The second command invokes Boost.Build to build the separately-compiled Boost libraries. Please consult thefor a list of allowed options.

5.3伀爀, Build Binaries From Source

If you're using an earlier version of Visual C++, or a compiler from another vendor, you'll need to useBoost.Buildto create your own binaries.

Boost.CMake

There is also an experimental CMake build for boost, supported and distributed separately. See thewiki page for more information.

5.3.1Install Boost.Build

Boost.Buildis a text-based system for developing, testing, and installing software. First, you'll need to build and install it. To do this:

  1. Go to the directorytools\build\v2\.
  2. Runbootstrap.bat
  3. Runb2 install--prefix=PREFIXwherePREFIXis the directory where you want Boost.Build to be installed
  4. AddPREFIX\binto your PATH environment variable.

5.3.2Identify Your Toolset

First, find the toolset corresponding to your compiler in the following table (an up-to-date list is always available).

Note

If you previously chose a toolset for the purposes ofbuilding b2, you should assume it won't work and instead choose newly from the table below.

Toolset Name Vendor Notes
acc Hewlett Packard Only very recent versions are known to work well with Boost
borland Borland  
como Comeau Computing Using this toolset may requireconfiguringanother toolset to act as its backend
darwin Apple Computer Apple's version of the GCC toolchain with support for Darwin and MacOS X features such as frameworks.
gcc The Gnu Project Includes support for Cygwin and MinGW compilers.
hp_cxx Hewlett Packard Targeted at the Tru64 operating system.
intel Intel  
msvc Microsoft  
sun Sun Only very recent versions are known to work well with Boost.
vacpp IBM The VisualAge C++ compiler.

If you have multiple versions of a particular compiler installed, you can append the version number to the toolset name, preceded by a hyphen, e.g.intel-9.0orborland-5.4.3.On Windows, append a version number even if you only have one version installed(unless you are using the msvc or gcc toolsets, which have special version detection code) orauto-linkingwill fail.

5.3.3匀攀氀攀挀琀 a Build Directory

Boost.Buildwill place all intermediate files it generates while building into thebuild directory. If your Boost root directory is writable, this step isn't strictly necessary: by default Boost.Build will create abin.v2/subdirectory for that purpose in your current working directory.

5.3.4Invokeb2

Change your current directory to the Boost root directory and invokeb2as follows:

b2 
--build-dir=
build-directory 
toolset=
toolset-name 
--build-type=complete stage

For a complete description of these and other invocation options, please see the.

For example, your session might look like this:4

C:\WINDOWS> cd 
C:\Program Files\boost\
boost_1_53_0
C:\Program Files\boost\
boost_1_53_0> b2 
^More? 
--build-dir="C:\Documents and Settings\dave\build-boost" 
^More? 
--build-type=complete 
msvc stage

Be sure to readthis noteabout the appearance of^,More?and quotation marks (") in that line.

The option “--build-type=complete” causes Boost.Build to build all supported variants of the libraries. For instructions on how to build only specific variants, please ask on the.

Building the specialstagetarget places Boost library binaries in thestage\lib\subdirectory of the Boost tree. To use a different directory pass the--stagedir=directoryoption tob2.

Note

b2is case-sensitive; it is important that all the parts shown inboldtype above be entirely lower-case.

For a description of other options you can pass when invokingb2, type:

b2 --help

In particular, to limit the amount of time spent building, you may be interested in:

  • reviewing the list of library names with--show-libraries
  • limiting which libraries get built with the--with-library-nameor--without-library-nameoptions
  • choosing a specific build variant by addingreleaseordebugto the command line.

Note

Boost.Build can produce a great deal of output, which can make it easy to miss problems. If you want to make sure everything is went well, you might redirect the output into a file by appending “>build.log2>&1” to your command line.

5.4Expected Build Output

During the process of building Boost libraries, you can expect to see some messages printed on the console. These may include

  • Notices about Boost library configuration—for example, the Regex library outputs a message about ICU when built without Unicode support, and the Python library may be skipped without error (but with a notice) if you don't have Python installed.

  • Messages from the build tool that report the number of targets that were built or skipped. Don't be surprised if those numbers don't make any sense to you; there are many targets per library.

  • Build action messages describing what the tool is doing, which look something like:

    toolset-name.c++ long/path/to/file/being/built
  • Compiler warnings.

5.5In Case of Build Errors

The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 formats as describedhere. Install the relevant development packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern.

If it seems like the build system can't find your compiler and/or linker, consider setting up auser-config.jamfile as described. If that isn't your problem or theuser-config.jamfile doesn't work for you, please address questions about configuring Boost for your compiler to the.

转载于:https://www.cnblogs.com/albertwang/p/3345992.html

你可能感兴趣的文章
问题 C: A+B Problem II
查看>>
读后感
查看>>
layer弹出框的定位
查看>>
react踩坑 - 1, componentDidMount使用
查看>>
3.Appium 安卓自动化(Andriod APP类型)
查看>>
I.MX6 Android /data 目录内容
查看>>
busybox microcom
查看>>
hdu6376 度度熊剪纸条 思维
查看>>
选择排序模板
查看>>
Ubuntu12.04 Opencv2.4.8 安装笔记
查看>>
[NodeJS] 优缺点及适用场景
查看>>
谈一谈你对js线程的理解
查看>>
div+css 怎么让一个小div在另一个大div里面 垂直居中
查看>>
poj3280(区间dp)
查看>>
DB2创建表、操作表等常用命令
查看>>
Hadoop-2.4.0分布式安装手册
查看>>
二维数组转换成一维数组
查看>>
easyui datagrid 点击表头的事件
查看>>
Web 应用程序项目 Himall.Web 已配置为使用 IIS。 无法访问 IIS 元数据库
查看>>
软件工程人才需求现状与发展现状分析
查看>>