2006-08-28 02:36:00 +02:00
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en" >
< head >
2011-11-19 21:07:41 +01:00
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2015-01-01 00:18:11 +01:00
< meta name = "generator" content = "Docutils 0.12: http://docutils.sourceforge.net/" / >
2011-11-19 21:07:41 +01:00
< title > libtorrent manual< / title >
2014-10-14 04:06:20 +02:00
< meta name = "author" content = "Arvid Norberg, arvid@libtorrent.org" / >
2015-05-12 08:23:14 +02:00
< meta name = viewport content = "width=device-width, initial-scale=1" >
2010-12-08 05:44:20 +01:00
< script type = "text/javascript" >
/* < ![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
< / script >
2006-08-28 02:36:00 +02:00
< link rel = "stylesheet" href = "style.css" type = "text/css" / >
2015-05-12 08:23:14 +02:00
< link rel = "stylesheet" type = "text/css" href = "rst.css" / >
2008-10-17 05:23:30 +02:00
< style type = "text/css" >
/* Hides from IE-mac \*/
* html pre { height: 1%; }
/* End hide from IE-mac */
< / style >
2006-08-28 02:36:00 +02:00
< / head >
< body >
< div class = "document" id = "libtorrent-manual" >
2008-10-17 05:23:30 +02:00
< div id = "container" >
2014-10-14 18:36:06 +02:00
< table id = "header" >
< tr > < td id = "orange" > < / td >
< td id = "logo" > libtorrent< / td > < / tr >
< / table >
2008-10-17 05:23:30 +02:00
< div id = "main" >
2006-08-28 02:36:00 +02:00
< h1 class = "title" > libtorrent manual< / h1 >
< table class = "docinfo" frame = "void" rules = "none" >
< col class = "docinfo-name" / >
< col class = "docinfo-content" / >
< tbody valign = "top" >
< tr > < th class = "docinfo-name" > Author:< / th >
2014-10-14 04:06:20 +02:00
< td > Arvid Norberg, < a class = "last reference external" href = "mailto:arvid@libtorrent.org" > arvid@ libtorrent.org< / a > < / td > < / tr >
2009-02-09 04:48:27 +01:00
< tr > < th class = "docinfo-name" > Version:< / th >
2014-07-06 21:18:00 +02:00
< td > 1.1.0< / td > < / tr >
2006-08-28 02:36:00 +02:00
< / tbody >
< / table >
< div class = "contents topic" id = "table-of-contents" >
2008-10-17 05:23:30 +02:00
< p class = "topic-title first" > Table of contents< / p >
2006-08-28 02:36:00 +02:00
< ul class = "simple" >
2011-07-30 19:53:34 +02:00
< li > < a class = "reference internal" href = "#downloading-and-building" id = "id8" > downloading and building< / a > < ul >
< li > < a class = "reference internal" href = "#building-from-svn" id = "id9" > building from svn< / a > < / li >
< li > < a class = "reference internal" href = "#building-with-bbv2" id = "id10" > building with BBv2< / a > < / li >
< li > < a class = "reference internal" href = "#building-with-autotools" id = "id11" > building with autotools< / a > < / li >
< li > < a class = "reference internal" href = "#building-with-other-build-systems" id = "id12" > building with other build systems< / a > < / li >
< li > < a class = "reference internal" href = "#build-configurations" id = "id13" > build configurations< / a > < / li >
< li > < a class = "reference internal" href = "#building-openssl-for-windows" id = "id14" > building openssl for windows< / a > < / li >
2006-08-28 02:36:00 +02:00
< / ul >
< / li >
< / ul >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "downloading-and-building" >
< h1 > downloading and building< / h1 >
2007-04-01 00:07:36 +02:00
< p > To acquire the latest version of libtorrent, you'll have to grab it from SVN.
2009-02-09 04:48:27 +01:00
You'll find instructions on how to do this < a class = "reference external" href = "http://sourceforge.net/svn/?group_id=79942" > here< / a > (see subversion access).< / p >
2006-08-28 02:36:00 +02:00
< p > The build systems supported " out of the box" in libtorrent are boost-build v2
(BBv2) and autotools (for unix-like systems). If you still can't build after
2013-01-21 20:13:24 +01:00
following these instructions, you can usually get help in the < tt class = "docutils literal" > #libtorrent< / tt >
IRC channel on < tt class = "docutils literal" > irc.freenode.net< / tt > .< / p >
2009-02-15 21:39:54 +01:00
< div class = "warning" >
< p class = "first admonition-title" > Warning< / p >
< p > A common mistake when building and linking against libtorrent is
to build with one set of configuration options (#defines) and
link against it using a different set of configuration options. Since
libtorrent has some code in header files, that code will not be
compatible with the built library if they see different configurations.< / p >
< p > Always make sure that the same TORRENT_* macros are defined when you
link against libtorrent as when you build it.< / p >
< p class = "last" > Boost-build supports propagating configuration options to dependencies.
When building using the makefiles, this is handled by setting the
configuration options in the pkg-config file. Always use pkg-config
when linking against libtorrent.< / p >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "building-from-svn" >
< h2 > building from svn< / h2 >
2007-04-01 00:07:36 +02:00
< p > To build libtorrent from svn you need to check out the libtorrent sources from
2011-07-30 19:53:34 +02:00
sourceforge. If you downloaded a release tarball, you can skip this section.< / p >
< p > To check out libtorrent follow these < a class = "reference external" href = "http://sourceforge.net/svn/?group_id=79942" > instructions< / a > .< / p >
2007-01-03 12:42:10 +01:00
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "building-with-bbv2" >
< h2 > building with BBv2< / h2 >
2006-08-28 02:36:00 +02:00
< p > The primary reason to use boost-build is that it will automatically build the
dependent boost libraries with the correct compiler settings, in order to
2009-02-09 04:48:27 +01:00
ensure that the build targets are link compatible (see < a class = "reference external" href = "http://boost.org/more/separate_compilation.html" > boost guidelines< / a >
2006-08-28 02:36:00 +02:00
for some details on this issue).< / p >
< p > Since BBv2 will build the boost libraries for you, you need the full boost
source package. Having boost installed via some package system is usually not
enough (and even if it is enough, the necessary environment variables are
usually not set by the package installer).< / p >
2008-03-10 07:25:00 +01:00
< p > If you want to build against an installed copy of boost, you can skip directly
to step 3 (assuming you also have boost build installed).< / p >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "step-1-download-boost" >
< h3 > Step 1: Download boost< / h3 >
2009-02-09 04:48:27 +01:00
< p > You'll find boost < a class = "reference external" href = "http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=619445" > here< / a > .< / p >
2006-08-28 02:36:00 +02:00
< p > Extract the archive to some directory where you want it. For the sake of this
2014-07-06 21:18:00 +02:00
guide, let's assume you extract the package to < tt class = "docutils literal" > < span class = "pre" > c:\boost_1_55_0< / span > < / tt > (I'm using
2006-08-28 02:36:00 +02:00
a windows path in this example since if you're on linux/unix you're more likely
2014-07-06 21:18:00 +02:00
to use the autotools). You'll need at least version 1.49 of the boost library
2006-08-28 02:36:00 +02:00
in order to build libtorrent.< / p >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "step-2-setup-bbv2" >
< h3 > Step 2: Setup BBv2< / h3 >
2013-01-21 20:13:24 +01:00
< p > First you need to build < tt class = "docutils literal" > bjam< / tt > . You do this by opening a terminal (In
windows, run < tt class = "docutils literal" > cmd< / tt > ). Change directory to
2014-07-06 21:18:00 +02:00
< tt class = "docutils literal" > < span class = "pre" > c:\boost_1_55_0\tools\jam\src< / span > < / tt > . Then run the script called
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > build.bat< / tt > or < tt class = "docutils literal" > build.sh< / tt > on a unix system. This will build < tt class = "docutils literal" > bjam< / tt > and
place it in a directory starting with < tt class = "docutils literal" > bin.< / tt > and then have the name of your
platform. Copy the < tt class = "docutils literal" > bjam.exe< / tt > (or < tt class = "docutils literal" > bjam< / tt > on a unix system) to a place
that's in you shell's < tt class = "docutils literal" > PATH< / tt > . On linux systems a place commonly used may be
< tt class = "docutils literal" > /usr/local/bin< / tt > or on windows < tt class = "docutils literal" > < span class = "pre" > c:\windows< / span > < / tt > (you can also add directories
to the search paths by modifying the environment variable called < tt class = "docutils literal" > PATH< / tt > ).< / p >
< p > Now you have < tt class = "docutils literal" > bjam< / tt > installed. < tt class = "docutils literal" > bjam< / tt > can be considered an interpreter
that the boost-build system is implemented on. So boost-build uses < tt class = "docutils literal" > bjam< / tt > .
2006-08-28 02:36:00 +02:00
So, to complete the installation you need to make two more things. You need to
2013-01-21 20:13:24 +01:00
set the environment variable < tt class = "docutils literal" > BOOST_BUILD_PATH< / tt > . This is the path that tells
< tt class = "docutils literal" > bjam< / tt > where it can find boost-build, your configuration file and all the
2006-08-28 02:36:00 +02:00
toolsets (descriptions used by boost-build to know how to use different
compilers on different platforms). Assuming the boost install path above, set
2014-07-06 21:18:00 +02:00
it to < tt class = "docutils literal" > < span class = "pre" > c:\boost_1_55_0\tools\build\v2< / span > < / tt > .< / p >
2006-08-28 02:36:00 +02:00
< p > To set an environment variable in windows, type for example:< / p >
< pre class = "literal-block" >
2014-07-06 21:18:00 +02:00
set BOOST_BUILD_PATH=c:\boost_1_55_0\tools\build\v2
2006-08-28 02:36:00 +02:00
< / pre >
< p > In a terminal window.< / p >
< p > The last thing to do to complete the setup of BBv2 is to modify your
2014-07-06 21:18:00 +02:00
< tt class = "docutils literal" > < span class = "pre" > user-config.jam< / span > < / tt > file. It is located in < tt class = "docutils literal" > < span class = "pre" > c:\boost_1_55_0\tools\build\v2< / span > < / tt > .
2006-08-28 02:36:00 +02:00
Depending on your platform and which compiler you're using, you should add a
line for each compiler and compiler version you have installed on your system
that you want to be able to use with BBv2. For example, if you're using
2014-07-06 21:18:00 +02:00
Microsoft Visual Studio 12 (2013), just add a line:< / p >
2006-08-28 02:36:00 +02:00
< pre class = "literal-block" >
2014-07-06 21:18:00 +02:00
using msvc : 12.0 ;
2006-08-28 02:36:00 +02:00
< / pre >
< p > If you use GCC, add the line:< / p >
< pre class = "literal-block" >
using gcc ;
< / pre >
< p > If you have more than one version of GCC installed, you can add the
commandline used to invoke g++ after the version number, like this:< / p >
< pre class = "literal-block" >
using gcc : 3.3 : g++-3.3 ;
using gcc : 4.0 : g++-4.0 ;
< / pre >
2013-01-21 20:13:24 +01:00
< p > Another toolset worth mentioning is the < tt class = "docutils literal" > darwin< / tt > toolset (For MacOS X).
2006-08-28 02:36:00 +02:00
From Tiger (10.4) MacOS X comes with both GCC 3.3 and GCC 4.0. Then you can
use the following toolsets:< / p >
< pre class = "literal-block" >
using darwin : 3.3 : g++-3.3 ;
using darwin : 4.0 : g++-4.0 ;
< / pre >
< p > Note that the spaces around the semi-colons and colons are important!< / p >
2009-02-09 04:48:27 +01:00
< p > Also see the < a class = "reference external" href = "http://www.boost.org/doc/html/bbv2/installation.html" > official installation instructions< / a > .< / p >
2006-08-28 02:36:00 +02:00
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "step-3-building-libtorrent" >
< h3 > Step 3: Building libtorrent< / h3 >
2013-01-21 20:13:24 +01:00
< p > When building libtorrent, the < tt class = "docutils literal" > Jamfile< / tt > expects the environment variable
< tt class = "docutils literal" > BOOST_ROOT< / tt > to be set to the boost installation directory. It uses this to
2006-08-28 02:36:00 +02:00
find the boost libraries it depends on, so they can be built and their headers
2014-07-06 21:18:00 +02:00
files found. So, set this to < tt class = "docutils literal" > < span class = "pre" > c:\boost_1_55_0< / span > < / tt > . You only need this if you're
2008-03-10 07:25:00 +01:00
building against a source distribution of boost.< / p >
2013-01-21 20:13:24 +01:00
< p > Then the only thing left is simply to invoke < tt class = "docutils literal" > bjam< / tt > . If you want to specify
2006-08-28 02:36:00 +02:00
a specific toolset to use (compiler) you can just add that to the commandline.
For example:< / p >
< pre class = "literal-block" >
2008-03-10 07:25:00 +01:00
bjam msvc-7.1 boost=source
bjam gcc-3.3 boost=source
bjam darwin-4.0 boost=source
2006-08-28 02:36:00 +02:00
< / pre >
2013-01-21 20:13:24 +01:00
< p > If you're building against a system installed boost, specify < tt class = "docutils literal" > boost=system< / tt > .< / p >
2006-08-28 02:36:00 +02:00
< p > To build different versions you can also just add the name of the build
2013-01-21 20:13:24 +01:00
variant. Some default build variants in BBv2 are < tt class = "docutils literal" > release< / tt > , < tt class = "docutils literal" > debug< / tt > ,
< tt class = "docutils literal" > profile< / tt > .< / p >
< p > You can build libtorrent as a dll too, by typing < tt class = "docutils literal" > link=shared< / tt > , or
< tt class = "docutils literal" > link=static< / tt > to build a static library.< / p >
2006-08-28 02:36:00 +02:00
< p > If you want to explicitly say how to link against the runtime library, you
2013-01-21 20:13:24 +01:00
can set the < tt class = "docutils literal" > < span class = "pre" > runtime-link< / span > < / tt > feature on the commandline, either to < tt class = "docutils literal" > shared< / tt >
or < tt class = "docutils literal" > static< / tt > . Most operating systems will only allow linking shared against
2006-08-28 02:36:00 +02:00
the runtime, but on windows you can do both. Example:< / p >
< pre class = "literal-block" >
2008-03-10 07:25:00 +01:00
bjam msvc-7.1 link=static runtime-link=static boost=source
2006-08-28 02:36:00 +02:00
< / pre >
2013-01-21 20:13:24 +01:00
< div class = "note" >
< p class = "first admonition-title" > Note< / p >
< p class = "last" > When building on windows, the path boost-build puts targets in may be too
long. If you get an error message like: " The input line is long" , try to
pass --abbreviate-paths on the bjam command line.< / p >
< / div >
2006-08-28 02:36:00 +02:00
< div class = "warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > If you link statically to the runtime library, you cannot build libtorrent
as a shared library (DLL), since you will get separate heaps in the library
2006-08-31 02:26:41 +02:00
and in the client application. It will result in crashes and possibly link
errors.< / p >
2006-08-28 02:36:00 +02:00
< / div >
2011-07-30 19:53:34 +02:00
< div class = "note" >
< p class = "first admonition-title" > Note< / p >
2008-03-21 06:59:34 +01:00
< p class = "last" > With boost-build V2 (Milestone 11), the darwin toolset uses the < tt class = "docutils literal" > < span class = "pre" > -s< / span > < / tt > linker
option to strip debug symbols. This option is buggy in Apple's GCC, and
will make the executable crash on startup. On Mac OS X, instead build
your release executables with the < tt class = "docutils literal" > < span class = "pre" > debug-symbols=on< / span > < / tt > option, and
2013-01-21 20:13:24 +01:00
later strip your executable with < tt class = "docutils literal" > strip< / tt > .< / p >
2008-03-21 06:59:34 +01:00
< / div >
2011-07-30 19:53:34 +02:00
< div class = "note" >
< p class = "first admonition-title" > Note< / p >
2013-01-21 20:13:24 +01:00
< p class = "last" > Some linux systems requires linking against < tt class = "docutils literal" > librt< / tt > in order to access
2008-05-15 20:51:19 +02:00
the POSIX clock functions. If you get an error complaining about a missing
2013-01-21 20:13:24 +01:00
symbol < tt class = "docutils literal" > clock_gettime< / tt > , you have to give < tt class = "docutils literal" > < span class = "pre" > need-librt=yes< / span > < / tt > on the
bjam command line. This will make libtorrent link against < tt class = "docutils literal" > librt< / tt > .< / p >
2008-05-15 20:51:19 +02:00
< / div >
2009-02-09 04:48:27 +01:00
< div class = "note" >
< p class = "first admonition-title" > Note< / p >
< p class = "last" > When building on Solaris, you might have to specify < tt class = "docutils literal" > < span class = "pre" > stdlib=sun-stlport< / span > < / tt >
on the bjam command line.< / p >
< / div >
2006-08-28 02:36:00 +02:00
< p > The build targets are put in a directory called bin, and under it they are
sorted in directories depending on the toolset and build variant used.< / p >
< p > To build the examples, just change directory to the examples directory and
2013-01-21 20:13:24 +01:00
invoke < tt class = "docutils literal" > bjam< / tt > from there. To build and run the tests, go to the test
directory and run < tt class = "docutils literal" > bjam< / tt > .< / p >
< p > Note that if you're building on windows using the < tt class = "docutils literal" > msvc< / tt > toolset, you cannot run it
from a cygwin terminal, you'll have to run it from a < tt class = "docutils literal" > cmd< / tt > terminal. The same goes for
2006-08-28 02:36:00 +02:00
cygwin, if you're building with gcc in cygwin you'll have to run it from a cygwin terminal.
Also, make sure the paths are correct in the different environments. In cygwin, the paths
2013-01-21 20:13:24 +01:00
(< tt class = "docutils literal" > BOOST_BUILD_PATH< / tt > and < tt class = "docutils literal" > BOOST_ROOT< / tt > ) should be in the typical unix-format (e.g.
2014-07-06 21:18:00 +02:00
< tt class = "docutils literal" > /cygdrive/c/boost_1_55_0< / tt > ). In the windows environment, they should have the typical
windows format (< tt class = "docutils literal" > < span class = "pre" > c:/boost_1_55_0< / span > < / tt > ).< / p >
2011-07-30 19:53:34 +02:00
< div class = "note" >
< p class = "first admonition-title" > Note< / p >
< p class = "last" > In Jamfiles, spaces are separators. It's typically easiest to avoid spaces
in path names. If you want spaces in your paths, make sure to quote them
with double quotes (" ).< / p >
< / div >
2013-01-21 20:13:24 +01:00
< p > The < tt class = "docutils literal" > Jamfile< / tt > will define < tt class = "docutils literal" > NDEBUG< / tt > when it's building a release build.
2009-02-09 04:48:27 +01:00
For more build configuration flags see < a class = "reference internal" href = "#build-configurations" > Build configurations< / a > .< / p >
2006-08-31 02:26:41 +02:00
< p > Build features:< / p >
< table border = "1" class = "docutils" >
< colgroup >
2008-08-03 17:14:08 +02:00
< col width = "33%" / >
< col width = "67%" / >
2006-08-31 02:26:41 +02:00
< / colgroup >
< thead valign = "bottom" >
< tr > < th class = "head" > boost build feature< / th >
< th class = "head" > values< / th >
< / tr >
< / thead >
< tbody valign = "top" >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > boost< / tt > < / td >
2008-01-11 09:27:16 +01:00
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > system< / tt > - default. Tells the Jamfile that
2008-01-11 09:27:16 +01:00
boost is installed and should be linked against
the system libraries.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > source< / tt > - Specifies that boost is to be built
2008-01-11 09:27:16 +01:00
from source. The environment variable
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > BOOST_ROOT< / tt > must be defined to point to the
2008-01-11 09:27:16 +01:00
boost directory.< / li >
< / ul >
< / td >
< / tr >
2008-07-06 14:22:56 +02:00
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > boost-link< / span > < / tt > < / td >
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > static< / tt > - links statically against the boost
2008-07-06 14:22:56 +02:00
libraries.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > shared< / tt > - links dynamically against the boost
2008-07-06 14:22:56 +02:00
libraries.< / li >
< / ul >
< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > logging< / tt > < / td >
2006-08-31 02:26:41 +02:00
< td > < ul class = "first last simple" >
2015-05-12 08:23:14 +02:00
< li > < tt class = "docutils literal" > off< / tt > - logging alerts disabled.< / li >
< li > < tt class = "docutils literal" > on< / tt > - default. logging alerts available,
still need to be enabled by the alert mask. The
reason to disable logging is to keep the binary
2014-12-10 03:58:23 +01:00
size down.< / li >
2006-08-28 02:36:00 +02:00
< / ul >
2006-08-31 02:26:41 +02:00
< / td >
< / tr >
2013-07-19 18:31:52 +02:00
< tr > < td > < tt class = "docutils literal" > dht< / tt > < / td >
2006-08-31 02:26:41 +02:00
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > on< / tt > - build with support for tracker less
2006-08-31 02:26:41 +02:00
torrents and DHT support.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > logging< / tt > - build with DHT support and verbose
2006-08-31 02:26:41 +02:00
logging of the DHT protocol traffic.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > off< / tt > - build without DHT support.< / li >
2006-08-31 02:26:41 +02:00
< / ul >
< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > asserts< / tt > < / td >
2007-06-06 02:41:20 +02:00
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > auto< / tt > - asserts are on if in debug mode< / li >
< li > < tt class = "docutils literal" > on< / tt > - asserts are on, even in release mode< / li >
< li > < tt class = "docutils literal" > off< / tt > - asserts are disabled< / li >
< li > < tt class = "docutils literal" > production< / tt > - assertion failures are logged
to < tt class = "docutils literal" > asserts.log< / tt > in the current working
2014-12-07 08:22:39 +01:00
directory, but won't abort the process.
The file they are logged to can be customized
by setting the global pointer < tt class = "docutils literal" > extern char
const* libtorrent_assert_log< / tt > to a different
filename.< / li >
< li > < tt class = "docutils literal" > system< / tt > use the libc assert macro< / li >
2007-06-06 02:41:20 +02:00
< / ul >
< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > encryption< / tt > < / td >
2007-06-06 02:41:20 +02:00
< td > < ul class = "first last simple" >
2014-12-29 17:58:48 +01:00
< li > < tt class = "docutils literal" > on< / tt > - encrypted bittorrent connections
enabled. (Message Stream encryption).< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > off< / tt > - turns off support for encrypted
2009-11-11 08:03:50 +01:00
connections. The shipped public domain SHA-1
implementation is used.< / li >
2007-06-06 02:41:20 +02:00
< / ul >
< / td >
< / tr >
2015-05-12 08:23:14 +02:00
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > mutable-torrents< / span > < / tt > < / td >
< td > < ul class = "first last simple" >
< li > < tt class = "docutils literal" > on< / tt > - mutable torrents are supported
(< a class = "reference external" href = "http://www.bittorrent.org/beps/bep_0038.html" > BEP 38< / a > ) (default).< / li >
< li > < tt class = "docutils literal" > off< / tt > - mutable torrents are not supported.< / li >
< / ul >
< / td >
< / tr >
2014-12-29 17:58:48 +01:00
< tr > < td > < tt class = "docutils literal" > crypto< / tt > < / td >
< td > < ul class = "first last simple" >
< li > < tt class = "docutils literal" > < span class = "pre" > built-in< / span > < / tt > - (default) uses built-in SHA-1
implementation.< / li >
< li > < tt class = "docutils literal" > openssl< / tt > - links against openssl and
libcrypto to use for SHA-1 hashing.< / li >
< li > < tt class = "docutils literal" > gcrypt< / tt > - links against libgcrypt to use for
SHA-1 hashing.< / li >
< / ul >
< / td >
< / tr >
2013-12-24 18:44:03 +01:00
< tr > < td > < tt class = "docutils literal" > allocator< / tt > < / td >
2008-04-10 12:03:23 +02:00
< td > < ul class = "first last simple" >
2013-12-24 18:44:03 +01:00
< li > < tt class = "docutils literal" > pool< / tt > - default, uses pool allocators for
send buffers.< / li >
< li > < tt class = "docutils literal" > system< / tt > - uses < tt class = "docutils literal" > malloc()< / tt > and < tt class = "docutils literal" > free()< / tt >
2008-04-10 12:03:23 +02:00
instead. Might be useful to debug buffer issues
with tools like electric fence or libgmalloc.< / li >
2013-12-24 18:44:03 +01:00
< li > < tt class = "docutils literal" > debug< / tt > - instruments buffer usage to catch
bugs in libtorrent.< / li >
2008-04-10 12:03:23 +02:00
< / ul >
< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > link< / tt > < / td >
2006-09-01 05:06:00 +02:00
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > static< / tt > - builds libtorrent as a static
2006-09-01 05:06:00 +02:00
library (.a / .lib)< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > shared< / tt > - builds libtorrent as a shared
2006-09-01 05:06:00 +02:00
library (.so / .dll).< / li >
< / ul >
< / td >
< / tr >
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > runtime-link< / span > < / tt > < / td >
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > static< / tt > - links statically against the
2006-09-01 05:06:00 +02:00
run-time library (if available on your
platform).< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > shared< / tt > - link dynamically against the
2006-09-01 05:06:00 +02:00
run-time library (default).< / li >
< / ul >
< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > variant< / tt > < / td >
2006-09-01 05:06:00 +02:00
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > debug< / tt > - builds libtorrent with debug
2006-09-01 05:06:00 +02:00
information and invariant checks.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > release< / tt > - builds libtorrent in release mode
2006-09-01 05:06:00 +02:00
without invariant checks and with optimization.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > profile< / tt > - builds libtorrent with profile
2006-09-01 05:06:00 +02:00
information.< / li >
< / ul >
< / td >
< / tr >
2007-04-27 18:26:30 +02:00
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > character-set< / span > < / tt > < / td >
< td > < p class = "first" > This setting will only have an affect on windows.
Other platforms are expected to support UTF-8.< / p >
< ul class = "last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > unicode< / tt > - The unicode version of the win32
2008-07-20 13:53:21 +02:00
API is used. This is default.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > ansi< / tt > - The ansi version of the win32 API is
2007-04-27 18:26:30 +02:00
used.< / li >
< / ul >
< / td >
< / tr >
2008-01-13 07:17:56 +01:00
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > invariant-checks< / span > < / tt > < / td >
< td > < p class = "first" > This setting only affects debug builds (where
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > NDEBUG< / tt > is not defined). It defaults to < tt class = "docutils literal" > on< / tt > .< / p >
2008-01-13 07:17:56 +01:00
< ul class = "last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > on< / tt > - internal invariant checks are enabled.< / li >
< li > < tt class = "docutils literal" > off< / tt > - internal invariant checks are
2008-01-13 07:17:56 +01:00
disabled. The resulting executable will run
faster than a regular debug build.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > full< / tt > - turns on extra expensive invariant
2008-07-19 09:57:43 +02:00
checks.< / li >
2008-01-13 07:17:56 +01:00
< / ul >
< / td >
< / tr >
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > debug-symbols< / span > < / tt > < / td >
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > on< / tt > - default for debug builds. This setting
2008-01-13 07:17:56 +01:00
is useful for building release builds with
symbols.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > off< / tt > - default for release builds.< / li >
2008-01-13 07:17:56 +01:00
< / ul >
< / td >
< / tr >
2008-08-03 17:14:08 +02:00
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > deprecated-functions< / span > < / tt > < / td >
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > on< / tt > - default. Includes deprecated functions
2008-08-03 17:14:08 +02:00
of the API (might produce warnings during build
when deprecated functions are used).< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > off< / tt > - excludes deprecated functions from the
2008-08-03 17:14:08 +02:00
API. Generates build errors when deprecated
functions are used.< / li >
< / ul >
< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > iconv< / tt > < / td >
2011-03-13 19:18:41 +01:00
< td > < ul class = "first last simple" >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > auto< / tt > - use iconv for string conversions for
2011-03-13 19:18:41 +01:00
linux and mingw and other posix platforms.< / li >
2013-01-21 20:13:24 +01:00
< li > < tt class = "docutils literal" > on< / tt > - force use of iconv< / li >
< li > < tt class = "docutils literal" > off< / tt > - force not using iconv (disables locale
2011-03-13 19:18:41 +01:00
awareness except on windows).< / li >
< / ul >
< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > i2p< / tt > < / td >
< td > < ul class = "first last simple" >
< li > < tt class = "docutils literal" > on< / tt > - build with I2P support< / li >
< li > < tt class = "docutils literal" > off< / tt > - build without I2P support< / li >
< / ul >
< / td >
< / tr >
2014-07-06 21:18:00 +02:00
< tr > < td > < tt class = "docutils literal" > < span class = "pre" > profile-calls< / span > < / tt > < / td >
< td > < ul class = "first last simple" >
< li > < tt class = "docutils literal" > off< / tt > - default. No additional call profiling.< / li >
< li > < tt class = "docutils literal" > on< / tt > - Enable logging of stack traces of
calls into libtorrent that are blocking. On
session shutdown, a file < tt class = "docutils literal" > blocking_calls.txt< / tt >
is written with stack traces of blocking calls
ordered by the number of them.< / li >
< / ul >
< / td >
< / tr >
2006-08-31 02:26:41 +02:00
< / tbody >
< / table >
2013-01-21 20:13:24 +01:00
< p > The < tt class = "docutils literal" > variant< / tt > feature is < em > implicit< / em > , which means you don't need to specify
2006-09-01 05:06:00 +02:00
the name of the feature, just the value.< / p >
2006-08-28 02:36:00 +02:00
< p > The logs created when building vlog or log mode are put in a directory called
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > libtorrent_logs< / tt > in the current working directory.< / p >
2006-08-28 02:36:00 +02:00
< p > When building the example client on windows, you need to build with
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > link=static< / tt > otherwise you may get unresolved external symbols for some
2006-08-28 02:36:00 +02:00
boost.program-options symbols.< / p >
2009-02-09 04:48:27 +01:00
< p > For more information, see the < a class = "reference external" href = "http://www.boost.org/tools/build/v2/index.html" > Boost build v2 documentation< / a > , or more
specifically < a class = "reference external" href = "http://www.boost.org/doc/html/bbv2/reference.html#bbv2.advanced.builtins.features" > the section on builtin features< / a > .< / p >
2006-08-28 02:36:00 +02:00
< / div >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "building-with-autotools" >
< h2 > building with autotools< / h2 >
2013-01-21 20:13:24 +01:00
< p > First of all, you need to install < tt class = "docutils literal" > automake< / tt > and < tt class = "docutils literal" > autoconf< / tt > . Many
2006-08-28 02:36:00 +02:00
unix/linux systems comes with these preinstalled.< / p >
2008-04-05 06:53:22 +02:00
< p > The prerequisites for building libtorrent are boost.thread, boost.date_time
2006-09-23 23:24:28 +02:00
and boost.filesystem. Those are the < em > compiled< / em > boost libraries needed. The
headers-only libraries needed include (but is not necessarily limited to)
boost.bind, boost.ref, boost.multi_index, boost.optional, boost.lexical_cast,
boost.integer, boost.iterator, boost.tuple, boost.array, boost.function,
boost.smart_ptr, boost.preprocessor, boost.static_assert.< / p >
2013-01-21 20:13:24 +01:00
< p > If you want to build the < tt class = "docutils literal" > client_test< / tt > example, you'll also need boost.regex
2006-09-23 23:24:28 +02:00
and boost.program_options.< / p >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "step-1-generating-the-build-system" >
< h3 > Step 1: Generating the build system< / h3 >
2006-08-28 02:36:00 +02:00
< p > No build system is present if libtorrent is checked out from CVS - it
needs to be generated first. If you're building from a released tarball,
2009-02-09 04:48:27 +01:00
you may skip directly to < a class = "reference internal" href = "#step-2-running-configure" > Step 2: Running configure< / a > .< / p >
2011-11-19 21:07:41 +01:00
< p > Execute the following command to generate the build system:< / p >
2006-09-01 05:06:00 +02:00
< pre class = "literal-block" >
2011-11-19 21:07:41 +01:00
./autotool.sh
2006-09-01 05:06:00 +02:00
< / pre >
2006-08-28 02:36:00 +02:00
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "step-2-running-configure" >
< h3 > Step 2: Running configure< / h3 >
2006-08-28 02:36:00 +02:00
< p > In your shell, change directory to the libtorrent directory and run
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > ./configure< / tt > . This will look for libraries and C++ features that libtorrent
2006-08-28 02:36:00 +02:00
is dependent on. If something is missing or can't be found it will print an
error telling you what failed.< / p >
< p > The most likely problem you may encounter is that the configure script won't
find the boost libraries. Make sure you have boost installed on your system.
The easiest way to install boost is usually to use the preferred package
system on your platform. Usually libraries and headers are installed in
standard directories where the compiler will find them, but sometimes that
may not be the case. For example when installing boost on darwin using
darwinports (the package system based on BSD ports) all libraries are
2013-01-21 20:13:24 +01:00
installed to < tt class = "docutils literal" > /opt/local/lib< / tt > and headers are installed to
< tt class = "docutils literal" > /opt/local/include< / tt > . By default the compiler will not look in these
directories. You have to set the enviornment variables < tt class = "docutils literal" > LDFLAGS< / tt > and
< tt class = "docutils literal" > CXXFLAGS< / tt > in order to make the compiler find those libs. In this example
2006-08-28 02:36:00 +02:00
you'd set them like this:< / p >
< pre class = "literal-block" >
export LDFLAGS=-L/opt/local/lib
export CXXFLAGS=-I/opt/local/include
< / pre >
< p > It was observed on FreeBSD (release 6.0) that one needs to add '-lpthread' to
LDFLAGS, as Boost::Thread detection will fail without it, even if
Boost::Thread is installed.< / p >
< p > If you need to set these variables, it may be a good idea to add those lines
to your < tt class = "docutils literal" > < span class = "pre" > ~/.profile< / span > < / tt > or < tt class = "docutils literal" > < span class = "pre" > ~/.tcshrc< / span > < / tt > depending on your shell.< / p >
2006-09-26 00:37:48 +02:00
< p > If the boost libraries are named with a suffix on your platform, you may use
the < tt class = "docutils literal" > < span class = "pre" > --with-boost-thread=< / span > < / tt > option to specify the suffix used for the thread
library in this case. For more information about these options, run:< / p >
< pre class = "literal-block" >
./configure --help
< / pre >
< p > On gentoo the boost libraries that are built with multi-threading support have
2013-01-21 20:13:24 +01:00
the suffix < tt class = "docutils literal" > mt< / tt > .< / p >
2006-08-28 02:36:00 +02:00
< p > You know that the boost libraries were found if you see the following output
from the configure script:< / p >
< pre class = "literal-block" >
checking whether the Boost::DateTime library is available... yes
checking for main in -lboost_date_time... yes
checking whether the Boost::Filesystem library is available... yes
checking for main in -lboost_filesystem... yes
checking whether the Boost::Thread library is available... yes
checking for main in -lboost_thread... yes
< / pre >
< p > Another possible source of problems may be if the path to your libtorrent
directory contains spaces. Make sure you either rename the directories with
spaces in their names to remove the spaces or move the libtorrent directory.< / p >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "creating-a-debug-build" >
< h3 > Creating a debug build< / h3 >
2006-08-28 02:36:00 +02:00
< p > To tell configure to build a debug version (with debug info, asserts
and invariant checks enabled), you have to run the configure script
with the following option:< / p >
< pre class = "literal-block" >
./configure --enable-debug=yes
< / pre >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "creating-a-release-build" >
< h3 > Creating a release build< / h3 >
2006-08-28 02:36:00 +02:00
< p > To tell the configure to build a release version (without debug info,
asserts and invariant checks), you have to run the configure script
with the following option:< / p >
< pre class = "literal-block" >
./configure --enable-debug=no
< / pre >
< p > The above option make use of -DNDEBUG, which is used throughout libtorrent.< / p >
< / div >
2011-07-30 19:53:34 +02:00
< div class = "section" id = "id7" >
2008-10-17 05:23:30 +02:00
< h3 > Step 3: Building libtorrent< / h3 >
2013-01-21 20:13:24 +01:00
< p > Once the configure script is run successfully, you just type < tt class = "docutils literal" > make< / tt > and
2006-08-28 02:36:00 +02:00
libtorrent, the examples and the tests will be built.< / p >
< p > When libtorrent is built it may be a good idea to run the tests, you do this
2013-01-21 20:13:24 +01:00
by running < tt class = "docutils literal" > make check< / tt > .< / p >
2006-08-28 02:36:00 +02:00
< p > If you want to build a release version (without debug info, asserts and
invariant checks), you have to rerun the configure script and rebuild, like this:< / p >
< pre class = "literal-block" >
./configure --disable-debug
make clean
make
< / pre >
< / div >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "building-with-other-build-systems" >
< h2 > building with other build systems< / h2 >
2006-08-28 02:36:00 +02:00
< p > If you're building in MS Visual Studio, you may have to set the compiler
options " force conformance in for loop scope" , " treat wchar_t as built-in
2010-05-02 05:27:44 +02:00
type" and " Enable Run-Time Type Info" to Yes.< / p >
2006-08-28 02:36:00 +02:00
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "build-configurations" >
< h2 > build configurations< / h2 >
2006-08-28 02:36:00 +02:00
< p > By default libtorrent is built In debug mode, and will have pretty expensive
invariant checks and asserts built into it. If you want to disable such checks
(you want to do that in a release build) you can see the table below for which
defines you can use to control the build.< / p >
< table border = "1" class = "docutils" >
< colgroup >
2008-07-19 09:57:43 +02:00
< col width = "45%" / >
< col width = "55%" / >
2006-08-28 02:36:00 +02:00
< / colgroup >
< thead valign = "bottom" >
< tr > < th class = "head" > macro< / th >
< th class = "head" > description< / th >
< / tr >
< / thead >
< tbody valign = "top" >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > NDEBUG< / tt > < / td >
2006-08-28 02:36:00 +02:00
< td > If you define this macro, all asserts,
invariant checks and general debug code will be
2008-01-12 19:19:18 +01:00
removed. Since there is quite a lot of code in
in header files in libtorrent, it may be
important to define the symbol consistently
across compilation units, including the clients
files. Potential problems is different
compilation units having different views of
structs and class layouts and sizes.< / td >
2006-08-28 02:36:00 +02:00
< / tr >
2015-05-12 08:23:14 +02:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_LOGGING< / tt > < / td >
< td > This macro will disable support for logging
2014-12-10 03:58:23 +01:00
alerts, like log_alert, torrent_log_alert and
2015-05-12 08:23:14 +02:00
peer_log_alert. With this build flag, you
2014-12-10 03:58:23 +01:00
cannot enable those alerts.< / td >
2006-08-28 02:36:00 +02:00
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_STORAGE_DEBUG< / tt > < / td >
2006-08-28 02:36:00 +02:00
< td > This will enable extra expensive invariant
checks in the storage, including logging of
piece sorting.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISK_STATS< / tt > < / td >
2008-01-12 19:44:22 +01:00
< td > This will create a log of all disk activity
which later can parsed and graphed using
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > parse_disk_log.py< / tt > .< / td >
2008-01-12 19:44:22 +01:00
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > UNICODE< / tt > < / td >
2006-08-28 02:36:00 +02:00
< td > If building on windows this will make sure the
UTF-8 strings in pathnames are converted into
UTF-16 before they are passed to the file
operations.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_POOL_ALLOCATOR< / tt > < / td >
2008-04-10 12:03:23 +02:00
< td > Disables use of < tt class = "docutils literal" > < span class = "pre" > boost::pool< > < / span > < / tt > .< / td >
< / tr >
2015-05-12 08:23:14 +02:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_MUTABLE_TORRENTS< / tt > < / td >
< td > Disables mutable torrent support (< a class = "reference external" href = "http://www.bittorrent.org/beps/bep_0038.html" > BEP 38< / a > )< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_LINKING_SHARED< / tt > < / td >
2006-08-28 02:36:00 +02:00
< td > If this is defined when including the
libtorrent headers, the classes and functions
2013-01-21 20:13:24 +01:00
will be tagged with < tt class = "docutils literal" > __declspec(dllimport)< / tt >
2006-08-28 02:36:00 +02:00
on msvc and default visibility on GCC 4 and
later. Set this in your project if you're
linking against libtorrent as a shared library.
(This is set by the Jamfile when
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > link=shared< / tt > is set).< / td >
2006-08-28 02:36:00 +02:00
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_BUILDING_SHARED< / tt > < / td >
2006-08-28 02:36:00 +02:00
< td > If this is defined, the functions and classes
in libtorrent are marked with
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > __declspec(dllexport)< / tt > on msvc, or with
2006-08-28 02:36:00 +02:00
default visibility on GCC 4 and later. This
should be defined when building libtorrent as
a shared library. (This is set by the Jamfile
2013-01-21 20:13:24 +01:00
when < tt class = "docutils literal" > link=shared< / tt > is set).< / td >
2006-08-28 02:36:00 +02:00
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_DHT< / tt > < / td >
2006-08-28 02:36:00 +02:00
< td > If this is defined, the support for trackerless
torrents will be disabled.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_ENCRYPTION< / tt > < / td >
2007-09-10 03:57:40 +02:00
< td > This will disable any encryption support and
2009-11-11 08:03:50 +01:00
the dependencies of a crypto library.
2007-09-10 03:57:40 +02:00
Encryption support is the peer connection
encrypted supported by clients such as
2009-11-11 08:03:50 +01:00
uTorrent, Azureus and KTorrent.
If this is not defined, either
2013-01-21 20:13:24 +01:00
< tt class = "docutils literal" > TORRENT_USE_OPENSSL< / tt > or
< tt class = "docutils literal" > TORRENT_USE_GCRYPT< / tt > must be defined.< / td >
2007-09-10 03:57:40 +02:00
< / tr >
2013-12-24 18:44:03 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_EXTENSIONS< / tt > < / td >
< td > When defined, libtorrent plugin support is
disabled along with support for the extension
handskake (BEP 10).< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > _UNICODE< / tt > < / td >
2008-01-12 19:44:22 +01:00
< td > On windows, this will cause the file IO
use wide character API, to properly support
non-ansi characters.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_RESOLVE_COUNTRIES< / tt > < / td >
2008-01-12 19:44:22 +01:00
< td > Defining this will disable the ability to
resolve countries of origin for peer IPs.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_DISABLE_INVARIANT_CHECKS< / tt > < / td >
2008-01-13 07:17:56 +01:00
< td > This will disable internal invariant checks in
libtorrent. The invariant checks can sometime
be quite expensive, they typically don't scale
very well. This option can be used to still
build in debug mode, with asserts enabled, but
make the resulting executable faster.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_EXPENSIVE_INVARIANT_CHECKS< / tt > < / td >
2008-07-19 09:57:43 +02:00
< td > This will enable extra expensive invariant
checks. Useful for finding particular bugs
or for running before releases.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_NO_DEPRECATE< / tt > < / td >
2008-08-03 17:14:08 +02:00
< td > This will exclude all deprecated functions from
the header files and cpp files.< / td >
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_PRODUCTION_ASSERTS< / tt > < / td >
2011-03-13 19:18:41 +01:00
< td > Define to either 0 or 1. Enables assert logging
in release builds.< / td >
< / tr >
2014-02-02 04:05:55 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_USE_ASSERTS< / tt > < / td >
< td > Define as 0 to disable asserts unconditionally.< / td >
2011-03-13 19:18:41 +01:00
< / tr >
2013-01-21 20:13:24 +01:00
< tr > < td > < tt class = "docutils literal" > TORRENT_USE_SYSTEM_ASSERTS< / tt > < / td >
2011-03-13 19:18:41 +01:00
< td > Uses the libc assert macro rather then the
custom one.< / td >
< / tr >
2006-08-28 02:36:00 +02:00
< / tbody >
< / table >
< p > If you experience that libtorrent uses unreasonable amounts of cpu, it will
2013-01-21 20:13:24 +01:00
definitely help to define < tt class = "docutils literal" > NDEBUG< / tt > , since it will remove the invariant checks
2006-08-28 02:36:00 +02:00
within the library.< / p >
< / div >
2008-10-17 05:23:30 +02:00
< div class = "section" id = "building-openssl-for-windows" >
< h2 > building openssl for windows< / h2 >
2008-08-17 13:30:24 +02:00
< p > To build openssl for windows with Visual Studio 7.1 (2003) execute the following commands
in a command shell:< / p >
< pre class = "literal-block" >
perl Configure VC-WIN32 --prefix=" c:/openssl
call ms\do_nasm
call " C:\Program Files\Microsoft Visual Studio .NET 2003\vc7\bin\vcvars32.bat"
nmake -f ms\nt.mak
copy inc32\openssl " C:\Program Files\Microsoft Visual Studio .NET 2003\vc7\include\"
copy out32\libeay32.lib " C:\Program Files\Microsoft Visual Studio .NET 2003\vc7\lib"
copy out32\ssleay32.lib " C:\Program Files\Microsoft Visual Studio .NET 2003\vc7\lib"
< / pre >
< p > This will also install the headers and library files in the visual studio directories to
be picked up by libtorrent.< / p >
< / div >
2006-08-28 02:36:00 +02:00
< / div >
2014-10-14 18:36:06 +02:00
< / div >
< / div >
< div id = "gradient" > < / div >
< div id = "footer" >
< table >
< tr >
< td > < a href = "index.html" > home< / a > < / td >
< td > < a href = "http://blog.libtorrent.org" > blog< / a > < / td >
< td > < a href = "utp.html" > uTP< / a > < / td >
< / tr >
< tr >
< td > < a href = "https://sourceforge.net/projects/libtorrent/files/libtorrent/" > download< / a > < / td >
< td > < a href = "reference.html" > documentation< / a > < / td >
< td > < a href = "dht_store.html" > DHT put extension< / a > < / td >
< / tr >
< tr >
< td > < a href = "https://sourceforge.net/projects/libtorrent/files/py-libtorrent/" > python bindings< / a > < / td >
< td > < a href = "features.html" > features< / a > < / td >
< td > < a href = "dht_sec.html" > DHT security extension< / a > < / td >
< / tr >
< tr >
< td > < a href = "http://dir.gmane.org/gmane.network.bit-torrent.libtorrent" > mailing list archive< / a > < / td >
< td > < a href = "contributing.html" > contributing< / a > < / td >
< td > < a href = "streaming.html" > streaming< / a > < / td >
< / tr >
< tr >
< td > < a href = "http://code.google.com/p/libtorrent/issues/entry" > report a bug< / a > < / td >
< td > < a href = "building.html" > building< / a > < / td >
< td > < a href = "bittorrent.pdf" > bittorrent slides< / a > < / td >
< / tr >
< / table >
< / div >
2015-05-12 08:23:14 +02:00
< div id = "filler" > < / div >
2014-10-14 18:36:06 +02:00
2006-08-28 02:36:00 +02:00
< / div >
< / body >
< / html >