QBittorrent编译过程分析<二>
来源:互联网 发布:单页seo 编辑:程序博客网 时间:2024/06/08 07:17
编译 QBittorrent需要两个步骤:
1、依赖库的编译2、qBittorrent本身的编译。
这里概要讲述第二步(很久以前做了第一步,现在忘了。过程很复杂)。
这里使用的IDE环境是 QtCreator 2.5 , 编译使用的是VS2010的库,所以QT版本是VS2010的版本。
依赖库:
- libtorrent (v0.16.1)
- Qt (4.8.1)
- Boost (1.49.0)
- MSVC 2010
当依赖库解决之后,就可以进行编译了。
首先必须下载最新的qbittorrent源代码,比如3.0.6的源代码。
需要修改的几个地方:
1、winconf.pri
2、winconf-msvc.pri
这里 是各种依赖库和头文件的设置。
下面是一个 例子:
winconf-msvc.pri:
RC_FILE = qbittorrent.rc# Enable Wide charactersDEFINES += TORRENT_USE_WPATH#Adapt the lib names/versions accordinglyCONFIG(debug, debug|release) { LIBS += libtorrentd.lib \ libboost_system-vc90-mt-gd.lib \ libboost_filesystem-vc90-mt-gd.lib \ libboost_thread-vc90-mt-gd.lib} else { LIBS += libtorrent.lib \ libboost_filesystem-vc100-mt-1_47.lib \ libboost_system-vc100-mt-1_47.lib \ libboost_thread-vc100-mt-1_47.lib}LIBS += advapi32.lib shell32.libLIBS += libeay32.lib ssleay32.libLIBS += PowrProf.lib
下面是 winconf.pri:
# Adapt these paths on WindowsINCLUDEPATH += $$quote(D:/buildings/boost_1_47_0)INCLUDEPATH += $$quote(D:/buildings/libtorrent-rasterbar-0.16.1/include)INCLUDEPATH += $$quote(D:/buildings/openssl-1.0.1c/include)#Point this to the boost lib folderLIBS += $$quote(-LD:/buildings/openssl-1.0.1c/out32dll)LIBS += $$quote(-LD:/buildings/libtorrent-rasterbar-0.16.1/bin/msvc-10.0/release/boost-source/encryption-openssl/geoip-static/link-static/threading-multi)LIBS += $$quote(-LD:/buildings/boost_1_47_0/stage/lib)# LIBTORRENT DEFINESDEFINES += BOOST_ALL_NO_LIBDEFINES += BOOST_ASIO_HASH_MAP_BUCKETS=1021DEFINES += BOOST_ASIO_SEPARATE_COMPILATIONDEFINES += BOOST_EXCEPTION_DISABLEDEFINES += BOOST_SYSTEM_STATIC_LINK=1DEFINES += TORRENT_USE_OPENSSLDEFINES += UNICODEDEFINES += _UNICODEDEFINES += WIN32DEFINES += _WIN32DEFINES += WIN32_LEAN_AND_MEANDEFINES += _WIN32_WINNT=0x0500DEFINES += _WIN32_IE=0x0500DEFINES += _CRT_SECURE_NO_DEPRECATEDEFINES += _SCL_SECURE_NO_DEPRECATEDEFINES += __USE_W32_SOCKETSDEFINES += _FILE_OFFSET_BITS=64DEFINES += WITH_SHIPPED_GEOIP_HCONFIG(debug, debug|release) { DEFINES += TORRENT_DEBUG} else { DEFINES += NDEBUG}win32-g++ { include(winconf-mingw.pri)}else { include(winconf-msvc.pri)}DEFINES += WITH_GEOIP_EMBEDDEDmessage("On Windows, GeoIP database must be embedded.")
- QBittorrent编译过程分析<二>
- vs2010编译qbittorrent
- linux下编译QBittorrent-3.1.9.2
- CentOS7 编译安装qbittorrent遇到的问题
- (二) u-boot 配置、编译过程分析
- u-boot-2016.09 make编译过程分析(二)
- u-boot-2016.09 make编译过程分析(二)
- jsp编译过程---二
- 编译原理分析过程
- Anroid 编译过程分析
- pmon编译过程分析
- 编译,链接过程分析
- GCC编译过程分析
- Uboot编译过程分析
- u-boot编译过程二
- Android的编译过程(二)
- 编译链接过程(二)
- Linux源码编译(二):编译过程
- poj1151
- .Net的 Reactive Extension (Rx)
- JAVA float精度
- PL/SQL Developer连接Oracle数据库,最简便的配置方法
- Small Word:物理引擎框架
- QBittorrent编译过程分析<二>
- Android SDK Manager下载SDK报错:Download interrupted: SSL peer shut down incorrectly
- 使用gcc编译时,头文件和库的位置指定参数
- 如何让编程不枯燥,甚至把编程变成一件很愉悦很爽的事?
- android wifi连接
- Linux下查看文件和文件夹大小
- 【实例】赵雅智_简单标签实例
- 关于sql server嵌套查询—子查询及相关子查询两个例题对照
- 常量_MFC_简单对话框