libtorrent在windows下编译过程
来源:互联网 发布:mac如何删除360云盘 编辑:程序博客网 时间:2024/06/11 08:19
http://blog.sina.com.cn/s/blog_53dc3f1a0100095x.html
编译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=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_torrent.cpp (parse torrent file)
- libtorrent在windows下编译过程
- libtorrent在windows下编译过程
- windows下libtorrent编译
- window下VS2008编译libtorrent的过程
- libtorrent在linux下的编译笔记
- VS2008下LibTorrent编译
- vlc在windows下的编译过程
- libevent 在windows下的编译过程
- WebRTC在Windows下的编译过程
- libevent 在windows下的编译过程
- libtorrent编译
- VS2005和VS2008下编译libtorrent
- ubuntu下libtorrent库(rakshasa)的编译
- windows下vs 2015下libtorrent库的配置,vs2015下-boost-openssl-libtorrent的配置
- FFmpeg在Windows系统下的编译过程
- 在Windows平台下FFMPEG编译的详细过程录
- FFmpeg在Windows系统下的编译过程
- 在Windows平台下FFMPEG编译的详细过程录
- C#事件的个人理解
- 使用Csharp读写XML文档
- Smart Client 学习笔记(02):添加工具条按钮
- 自己好失败,好失败!
- Visual Leak Detector简介
- libtorrent在windows下编译过程
- 工作就像超市的商品,随你挑选。未来社会之一
- DataGrideView绘制行号
- 家有极品娃
- 使用PreLayoutDynInitL()函数
- GTK+图形化应用程序开发学习笔记(一)—概述 转载:http://blog.chinaunix.net/u/22935/showart_308184.html
- Thread- 扩展java.lang.Thread类,实现多线程
- js日期时间函数
- 使用静态连接库LIB