﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-从加加开始，加到永远……-文章分类-C++类库之BOOST</title><link>http://www.cppblog.com/cppbloger/category/3923.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 21 May 2008 14:29:43 GMT</lastBuildDate><pubDate>Wed, 21 May 2008 14:29:43 GMT</pubDate><ttl>60</ttl><item><title>BOOST之一：Boost 的安装与配置</title><link>http://www.cppblog.com/cppbloger/articles/20982.html</link><dc:creator>孙明明</dc:creator><author>孙明明</author><pubDate>Fri, 30 Mar 2007 17:49:00 GMT</pubDate><guid>http://www.cppblog.com/cppbloger/articles/20982.html</guid><wfw:comment>http://www.cppblog.com/cppbloger/comments/20982.html</wfw:comment><comments>http://www.cppblog.com/cppbloger/articles/20982.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/cppbloger/comments/commentRss/20982.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cppbloger/services/trackbacks/20982.html</trackback:ping><description><![CDATA[
		<p>下面的内容转载自蕭鴻森的《如何在Visual Studio 2005編譯boost? 》一文。</p>
		<h2>1. 下载 boost source </h2>
		<p>         到 <a href="http://www.boost.org">http://www.boost.org</a> 下载最新版本的 boost ，我目前下载的是 1.33.1 ，将之解压缩到 c:\boost_1_33_1\ 下 。<br /></p>
		<h2>2. 编译 bjam </h2>
		<p>         利用 Visual Studio 2005 Command Prompt 开启 DOS 窗口，将目录 cd 到 C:\boost_1_33_1\tools\build\jam_src 下，执行 build.bat ，然后会在 C:\boost_1_33_1\tools\build\jam_src\bin.ntx86\ 产生 bjam.exe ，将 bjam.exe 复制到 c:\boost_1_33_1\ 下。</p>
		<h2>3. 编译 boost </h2>
		<p>       将目录移至 c:\boost_1_33_1\ 下执行 bjam "-sTOOLS=vs-8_0" "-sPYTHON_ROOT=c:\Python25"<br />"--prefix=c:\boost" install <br /></p>
		<p>       参数说明 ：<br /></p>
		<ul>
				<li>-sTOOLS : 使用 compiler ，Visual Studio 2005 为 vs-8_0 
</li>
				<li>-sPYTHON_ROOT ： boost 1.33.1 预设支持 python 2.4 ，但最新版本为 python 2.5 ，若要同时编译支持 Python 的 boost ，须加上 "-sPYTHON_ROOT" 参数指定 Python 目录 
</li>
				<li>--prefix ：指定编译后 library 的安装目录 
</li>
				<li>--sVC80_ROOT ：若你的 Visual Studio 2005 不是安装在默认目录，就必须自己指定，如 "-sVC80_ROOT=D:\Program Files\Microsoft Visual Studio 8\VC" </li>
		</ul>
		<h2>4. 开始编译</h2>        需要一段时间编译，出现不少 warning 讯息，但不用担心，主要是 Visual C++ 8.0 支持新的 C++ 标准，但 boost 用了一些 deprecated 的写法，以及 code page 的警告。 
<h2>5. 设定 Visual Studio 2005 环境 </h2><p>         Tools -&gt; Options -&gt; Projects and Solutions -&gt; VC++ Directories<br />         </p><ul><li>在 Library files 加上 c:\boost\lib
</li><li>在 Include files 加上 c:\Boost\include\boost-1_33_1 <br /></li></ul><img src ="http://www.cppblog.com/cppbloger/aggbug/20982.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cppbloger/" target="_blank">孙明明</a> 2007-03-31 01:49 <a href="http://www.cppblog.com/cppbloger/articles/20982.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>