一、OpenSSL的源码和编译环境下载:

OpenSSL安装过程

1. 安装ActivePerl程序,确保其bin目录在环境变量path里面

2. 解压OpenSSL源代码到 F:\openssl (目录自己定义)

3. 运行 Visual Studio 2008命令提示

4. 在命令行下输入如下命令:

F:

cd

openssl

perl

configure VC-WIN32

ms\do_ms

nmake -f

ms\ntdll.mak (编译静态版本的执行 nmake -f ms\nt.mak )

5. 编译完成后会在 F:\openssl\out32dll

目录下生成库文件、动态链接库文件、Openssl执行文件和测试程序,有用的文档就是三个 openssl.exe

libeay32.dll ssleay32.dll

注意:如果出现警告作为错误的error,请修改ms目录下的ntdll.mak文件,把-w3修改为-w0

二、编译boost

源文件准备

1、boost_1_39_0.tar.bz2,解压到F:\boost_1_39_0

2、http://icu-project.org/download/4.2.html下载icu4c-4_2_1-Win32-msvc9.zip,解压到F:\boost_1_39_0,出现F:\boost_1_39_0\icu,添加icu的bin目录到path环境变量中

编译

3、执行F:\boost_1_39_0\tools\jam\build_dist.bat,生成文件F:\boost_1_39_0\tools\jam\stage\bin.ntx86\bjam.exe,把bjam.exe拷贝到F:\boost_1_39_0目录下

4、在F:\boost_1_39_0目录新建一个bat文件,命名为:bootstrap_vc8.bat,内容为:

REM used with regex library with unicode support

set ICU_PATH="F:/boost_1_39_0/icu"

REM lib版本

bjam --without-python

--toolset=msvc-9.0

5、执行bootstrap_vc8.bat即可,结果生成的静态库放在F:\boost_1_39_0\stage\lib,动态库及编译文件都在F:\boost_1_39_0\bin.v2\libs中

三、编译libtorrent

源文件准备

1、从http://sourceforge.net/projects/libtorrent/下载libtorrent-rasterbar-0.14.4.tar.gz,解压到F:\libtorrent

2、下载openssl-1.0.0-beta3解压到F:\libtorrent\openssl-1.0.0-beta3

3、下载boost_1_39_0.tar.bz2解压到F:\boost_1_39_0

编译

3、按照我“使用Visual Studio 2008编译openssl”的文章编译opensll

4、按照我“使用Visual Studio 2008编译boost”的文章编译boost

5、新建win32 lib项目工程libtorrent

添加F:\libtorrent\src、F:\libtorrent\zlib和F:\libtorrent\src\kademlia下的所有源文件到工程

预编译宏添加

WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0501;

__USE_W32_SOCKETS;TORRENT_LOGGING;TORRENT_VERBOSE_LOGGING;

TORRENT_STORAGE_DEBUG;TORRENT_UPNP_LOGGING;TORRENT_DISK_STATS;

TORRENT_STATS;TORRENT_DHT_VERBOSE_LOGGING;TORRENT_VERBOSE_BANDWIDTH_LIMIT;

TORRENT_USE_OPENSSL;UNICODE;_UNICODE;CMAKE_INTDIR=\"Debug\"

头文件包含添加

f:\boost_1_39_0;F:\libtorrent\include;F:\libtorrent\zlib;"F:\libtorrent\openssl-1.0.0-beta3\include"

6、build即可

说明:如果要编译dll项目,除了添加如上预编译宏外,还要添加TORRENT_BUILDING_SHARED宏,然后添加引用的lib:

libeay32.lib

ssleay32.lib

libboost_date_time-vc90-mt.lib

libboost_filesystem-vc90-mt.lib

libboost_system-vc90-mt.lib

libboost_thread-vc90-mt.lib

添加lib引用路径:

F:\boost_1_39_0\stage\lib;F:\libtorrent\openssl-1.0.0-beta3\out32dll

完毕---本介绍是一次编译完libtorrent(包含zlib),没有独立编译zlib

下面是两个使用libtorrent的开源项目例子:

Linux:ctorrent

windows:halite

libtorrent java_libtorrent 编译相关推荐

  1. rtorrent编译

    去 rtorrent 下载 libtorrent 并编译安装 g++ 需要4.6.3以上: sudo update-alternatives --config g++ "AM_PATH_CP ...

  2. vs2008 编译libtorrent

    网上可参考的文章已经有很多很详细了,主要参考: http://hi.baidu.com/chinacharis/blog/item/f58bef76e02ede12b051b92a.html 编译op ...

  3. deepin系统下编译使用libtorrent

    deepin系统下编译使用libtorrent 安装openssl 查看系统是否安装ssl openssl version -a 安装openssl sudo apt install openssl ...

  4. 关于libtorrent库的安装

    前言: 前段时间由于工作需要,在Python的web开发框架Django中使用到了libtorrent这个C++扩展库来解析链接或种子数据.特了解和尝试了libtorrent库的安装.一般情况下,为了 ...

  5. 在Ubuntu下rtorrent编译安装笔记

    为什么80%的码农都做不了架构师?>>>    rtorrent是一个Bittorrent软件,基于终端的BT客户端,高性能.低资源,另外有不少人给rtorrent开发了Web GU ...

  6. CentOS7 编译安装qbittorrent遇到的问题

    首先是编译安装libtorrent-rasterbar-1.1.3提示 lsd.cpp: In constructor 'libtorrent::lsd::lsd(libtorrent::io_ser ...

  7. libtorrent java_[libtorrent] windows搭建 libtorrent 开发环境

    操作系统:win10 开发工具:VS2019 搭建 libtorrent 步骤: 一. 安装 vcpkg 和 boost 2. 执行 bootstrap-vcpkg.bat 脚本 .\vcpkg\bo ...

  8. 安装 libtorrent遇到问题

    libtorrent的一个问题 http://bbs.csdn.net/topics/390890988 //上文有人说用msi方式安装了python-libtorrent-0.16.10.win32 ...

  9. 编译frostwire项目jlibtorrent_jni.cpp

    在上一篇文章中已经编译好了boost库,libtorrent库,openssl,接下来编译libtorrent_jni.cpp; 这个文件是供jni调用底层libtorrent库的接口,为了方便在ja ...

  10. android rtorrent 编译,在Ubuntu下rtorrent编译安装笔记

    rtorrent是一个Bittorrent软件,基于终端的BT客户端,高性能.低资源,另外有不少人给rtorrent开发了Web GUI来更好的让用户控制管理rtorrent,总而言之在Linux平台 ...

最新文章

  1. SpringBoot conditional注解和自定义conditional注解使用
  2. 关于修改远程连接端口(3389端口修改)
  3. 【HDU1203 HDU2955 01背包中的简单概率问题处理】
  4. 如何在程序中生成崩溃转储dump文件以及如何分析dump
  5. 接入Tinker热修复和踩坑
  6. JSP URL重写-urlrewrite
  7. solidity事件详解
  8. 洛谷P4219 大融合(LCT、虚子树)
  9. JVM 学习一:JVM 的构架模型及生命周期
  10. SQL_EXEC_ID分析(转帖)
  11. 常用脚本--在线重建或重整实例下所有索引
  12. 测试基础-07-测试报告编写
  13. 最新Discuz验证码和PhpWind验证码的识别
  14. 多台电脑集群运算_Linux服务器集群概念辨识
  15. Mac下nginx的安装记录(亲测可用)
  16. wps比对两列数据重复_“两个wps表格,怎么比对重复的数据?“两个表格对照核对...
  17. W54 - 999、TensorFlow框架识别图片
  18. Guideline 2.3.3 -- We noticed that your screenshots do not sufficiently reflect your app in use
  19. startActivitystartActivities有什么不同?
  20. HR模块-组织信息类型创建-PP01

热门文章

  1. 数据结构 图的邻接矩阵
  2. WIN10虚拟机安装教程
  3. MATLAB图像检索系统GUI设计
  4. NC单据模板公式(6大类)
  5. Latex 求职简历模版
  6. html打印成pdf页面大小,pdf页面大小调整 pdf打印页边距怎么设置
  7. android 蓝牙连接苹果手机号码,苹果与android蓝牙连接怎么实现
  8. 推荐 五个单变量时间序列数据集
  9. 2021年安全员-C证(山东省-2020版)考试及安全员-C证(山东省-2020版)模拟试题
  10. w10安装ubuntu_记 Win10 + Ubuntu 双系统安装