Http://blog.sina.com.cn/s/blog_53dc3f1a0100095x.html
Compile boost:
1. Unzip boost source
To the http://www.boost.org under the latest version of the boost, I am currently under the release is 1.33.1, the solution will continue to c:/boost_000033_1/
2. zookeeper bjam
Use Visual Studio 2005 Command Prompt to open the DOS Startup window, and upload the Objective cd to C:/boost_000033_1/tools/build/jam_src. bat, and then in C:/boost_000033_1/tools/build/jam_src/bin. ntx86/www.bjam.exe, and then upload bjam.exe to c:/boost_000033_1 /.
3. zookeeper boost
Move the contents to c:/boost_000033_1/and the following line bjam "-sTOOLS = vs-8_0" "-sPYTHON_ROOT = c:/Python25"
"-- Prefix = c:/boost" install
Data Description
-STOOLS: Using compiler, Visual Studio 2005 for vs-8_0
-SPYTHON_ROOT: boost 1.33.1 the latest version supports python 2.4, but the latest version is python 2.5. To support Python boost at the same time, the "-sPYTHON_ROOT" parameter must be added to specify the Python category.
-- Prefix: Specifies the Security category of the library after the repository is created.
-- SVC80_ROOT: If your Visual Studio 2005 is not set to a category in the category, you must specify it by yourself, such as "-sVC80_ROOT = D: /Program Files/Microsoft Visual Studio 8/VC"
4. start logging
It may take some time to complete and there are a lot of warning messages, but you don't have to worry about it. The main reason is that Visual C ++ 8.0 supports the new C ++ standard, however, boost uses some deprecated encoding methods and code page warnings.
5. Set the Visual Studio 2005 Environment
Tools-> Options-> Projects and Solutions-> VC ++ Directories
Add c:/boost/lib to Library files
Add c:/Boost/Include/boost-1_33_1 to include files
----------------------------------------------------------------
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 = 0x0500
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_torw.cpp (parse torrent file)