arctic的编译必须过程?>又一篇中文的

5月 29, 2008 | 9:47 上午分类:BT && Emule | 1,153 次浏览

中文的:

编译boost:
1.下?boost source
到http://www.boost.org下?最新版本的boost,我目前下?的是1.33.1,?之解??到c:\boost_1_33_1\下
2.??bjam
利用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\下

3.??boost
?目?移至c:\boost_1_33_1\下?行bjam “-sTOOLS=vs-8_0″ “-sPYTHON_ROOT=c:\Python25″
“–prefix=c:\boost” install

???明
-sTOOLS : 使用compiler,Visual Studio 2005?vs-8_0

-sPYTHON_ROOT:boost 1.33.1??支援python 2.4,但最新版本?python 2.5,若要同???支援Python的boost,?加上”-sPYTHON_ROOT”??指定Python目?

–prefix:指定??後library的安?目?

–sVC80_ROOT:若你的Visual Studio 2005不是安?在??目?,就必?自己指定,如”-sVC80_ROOT=D:\Program Files\Microsoft Visual Studio 8\VC”

4.?始??
需要一段????,出?不少warning?息,但不用?心,主要是Visual C++ 8.0支援新的C++??,但boost用了一些deprecated的?法,以及code page的警告。

5.?定Visual Studio 2005?境
Tools -> Options -> Projects and Solutions -> VC++ Directories
在Library files加上c:\boost\lib
在Include files加上c:\Boost\include\boost-1_33_1

—————————————————————-
setting up and compiling libtorrent with vs.net 2005
1. create a new vs.net 2005 MFC project and solution file
2. include the files contained in the src folder, excluding the makefiles.
only include either file.cpp or file_win.cpp
3. include all .c files in the zlib folder
4. add the following additional include header files:
“libtorrent\include”
“c:\boost\include\boost-1_33_1″
“libtorrent\zlib”
“libtorrent\include\libtorrent”
5. add the following preprocessor definitions:
WIN32
WIN32_LEAN_AND_MEAN
_WIN32_WINNT=0×0500
BOOST_ALL_NO_LIB
_FILE_OFFSET_BITS=64
BOOST_THREAD_USE_LIB
TORRENT_BUILDING_SHARED
TORRENT_LINKING_SHARED
UNICODE

6. add c:\boost\lib to additional library directories
7. add the following additional dependencies: under project property pages->configuration properties–>linker->Input->Addtional Dependencies

wsock32.lib
libboost_thread-vc80-mt.lib
libboost_filesystem-vc80-mt.lib
libboost_date_time-vc80-mt.lib
8. set the runtime library to Multi-threaded Debug Dll(/MDd) under the code generation section.
—————————————————————–

libtorrent provides some examples : dump_torrent.cpp (parse torrent file)

发表您的评论

您的名字:

您的邮箱: (*不会被公布

您的网站: