<转>boost 1.53 and STLPort build binary for windows

时间:2023-02-23 10:53:59
 
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
<转>boost 1.53 and STLPort build binary for windows
附录:

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 theBoost.Build documentationfor 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 theBoost.CMakewiki 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 availablein the Boost.Build documentation).

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 theBoost.Build documentation.

For example, your session might look like this:4

C:\WINDOWS> cd C:\Program Files\boost\boost_1_53_0C:\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 theBoost.Build mailing list.

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 describedhere. 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 theBoost.Build mailing list.

<转>boost 1.53 and STLPort build binary for windows的更多相关文章

  1. ubuntu 14&period;04 安装boost 1&period;53

    安装依赖 $ sudo apt-get install mpi-default-dev $ sudo apt-get install libicu-dev $ sudo apt-get install ...

  2. Build step &&num;39&semi;Execute Windows batch command&&num;39&semi; marked build as failure

    坑爹的Jenkis,在执行windows命令编译.NET项目的时候命令执行成功了,但是却还是报了这样一个错: Build step 'Execute Windows batch command' ma ...

  3. Setting up a EDK II build environment on Windows and Linux:搭建Windows和Linux开发环境&lbrack;2&period;2&rsqb;

    Setting up a EDK II build environment on Windows and Linux:搭建Windows和Linux开发环境[2.2] 2015-07   北京海淀区  ...

  4. C&plus;&plus;三大库boost、loki、stlport

    转: STL是一个标准,各商家根据这个标准开发了各自的STL版本.而在这形形色色的STL版本中,SGI STL无疑是最引人瞩目的一个.这当然是因为这个STL产品系出名门,其设计和编写者名单中,Alex ...

  5. Build Slic3r on Windows &sol;&sol; 如何在Windows上编译Slic3r

    下载Strawberry Perl 5.22 64bit绿色版,解压缩到某个地方,比如C盘根目录,比如 C:\strawbrry-perl-5.22.2.1-64bit-portable 下载Boos ...

  6. Build 2015 Beijing &amp&semi; Windows 10 China Geek Challenge

    6月5日,借着Build 2015在北京召开分会的东风,参加了这次由微软中国举办的Windows 10中国开发者极客挑战赛. 白天是Build 2015课程,学习了Windows 10最新的技术,包括 ...

  7. gtk&plus;-3&period;21&period;4 static build step in windows XP

    In recent days the weather is very hot Unable to sleep properly Under the state of daze research gtk ...

  8. Build better apps&colon; Windows 10 by 10 development series

    http://blogs.windows.com/buildingapps/2015/08/05/build-better-apps-windows-10-by-10-development-seri ...

  9. Electron 桌面应用打包(npm run build)简述&lpar;windows &plus; mac&rpar;

    最近一段时间在用electron+vue做内部项目的一键构建发布系统的桌面应用,现就其中打包流程写个备注,以示记录. Windows环境打包:1.首先贴一下package.json. { " ...

随机推荐

  1. 现代Web应用开发者必备的六大技能

    过去,应用开发需要注重大量的专业知识,程序员只需关注单一的语言(比如COBOL.RPG.C++等),并利用该语言创建应用.而如今,时代在变迁.Web不再是单单关注独立的一面.相反,一个现代化的Web应 ...

  2. setProgressBarIndeterminateVisibility&lpar;true&rpar;&semi;

    此为在标题栏 上 设置一个loading 圈  实用...

  3. jQuery Uploadify在ASP&period;NET MVC中的使用

    感谢http://www.cnblogs.com/libingql/archive/2012/09/11/2681007.html 除此之外,给大家推荐一个: http://gallery.kissy ...

  4. 判断子元素(or属性)是否存在

    if(typeof($("#aid").attr("rel"))=="undefined") 即可

  5. Redis学习资料汇总(荐)

    Redis学习手册系列: http://www.cnblogs.com/stephen-liu74/category/354125.html Redis详解:sorted sets数据类型及操作-IT ...

  6. 使用PHP从web访问mysql数据库

    一. web数据库构架的工作原理 1. 用户由浏览器发出HTTP请求,请求特定的web页面. 2. web服务器接受接收到对特定页面的请求,检索相应文件,并将其传递给php引擎处理. 3. php引擎 ...

  7. Laravel nginx 伪静态规则

    最近的各种调查PHP相框(CI, Cake, ThinkPHP, Laravel, Yii)情绪Laravel它看起来很漂亮,下一个深入了解.用发展机Apache,Stage在运行nginx,一旦部署 ...

  8. error C2039&colon; &&num;39&semi;SetDefaultDllDirectories&&num;39&semi;错误解决办法

    使用VS2013+WDK8.1+Win7开发UMDF驱动,当使用了CComPtr类,包含了atlcomcli.h头文件却报错,错误如下: Error 3 error C2039: 'SetDefaul ...

  9. JavaScript中常用的BOM对象(属性、方法)

    window对象 定义: 一个浏览器窗口实例 与窗口有关的信息(应用程序编程接口) ECMAScript规定的Global对象 方法 open(url),返回标识符 引用 即将打开窗口的.(调用该引用 ...

  10. spring-boot的三种启动方式&lbrack;z&rsqb;

    https://blog.csdn.net/u011425751/article/details/79507386 有段时间没有写博客了,也在努力的从传统单机开发向分布式系统过度,所以再次做一些笔记, ...