From 66fc7e3b2b395f0be00419151894f7f7fa3c2896 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 18 Mar 2008 16:27:15 +0000 Subject: [PATCH] regenerated html --- docs/building.html | 95 +++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/docs/building.html b/docs/building.html index c9b7d6e16..c4658a270 100644 --- a/docs/building.html +++ b/docs/building.html @@ -16,40 +16,40 @@ Author: -Arvid Norberg, arvid@rasterbar.com +Arvid Norberg, arvid@rasterbar.com
-

Table of contents

+

Table of contents

-
-

downloading and building

+
+

downloading and building

To acquire the latest version of libtorrent, you'll have to grab it from SVN. -You'll find instructions on how to do this here (see subversion access).

+You'll find instructions on how to do this here (see subversion access).

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 following these instructions, you can usually get help in the #libtorrent IRC channel on irc.freenode.net.

-

Community contributed build tutorials can be found on the wiki.

-
-

building from svn

+

Community contributed build tutorials can be found on the wiki.

+
+

building from svn

To build libtorrent from svn you need to check out the libtorrent sources from sourceforge and also check out the asio sources from its sourceforge cvs. If you downloaded a release tarball, you can skip this section.

To prepare the directory structure for building, follow these steps:

    -
  • Check out libtorrent (instructions).
  • -
  • Check out asio (instructions).
  • +
  • Check out libtorrent (instructions).
  • +
  • Check out asio (instructions).
  • Copy the asio/include/asio/ directory into the libtorrent/include/libtorrent/ directory. Alternatively you can make a symbolic link.
  • Copy asio/include/asio.hpp into libtorrent/include/libtorrent.
  • @@ -57,11 +57,11 @@ directory. Alternatively you can make a symbolic link.

    Now the libtorrent directory is ready for building. Follow the steps in one of the following sections depending on which build system you prefer to use.

-
-

building with BBv2

+
+

building with BBv2

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 -ensure that the build targets are link compatible (see boost guidelines +ensure that the build targets are link compatible (see boost guidelines for some details on this issue).

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 @@ -69,17 +69,17 @@ enough (and even if it is enough, the necessary environment variables are usually not set by the package installer).

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).

-
-

Step 1: Download boost

-

You'll find boost here.

+
+

Step 1: Download boost

+

You'll find boost here.

Extract the archive to some directory where you want it. For the sake of this guide, let's assume you extract the package to c:\boost_1_34_0 (I'm using a windows path in this example since if you're on linux/unix you're more likely to use the autotools). You'll need at least version 1.34 of the boost library in order to build libtorrent.

-
-

Step 2: Setup BBv2

+
+

Step 2: Setup BBv2

First you need to build bjam. You do this by opening a terminal (In windows, run cmd). Change directory to c:\boost_1_34_0\tools\jam\src. Then run the script called @@ -129,10 +129,10 @@ using darwin : 3.3 : g++-3.3 ; using darwin : 4.0 : g++-4.0 ;

Note that the spaces around the semi-colons and colons are important!

-

Also see the official installation instructions.

+

Also see the official installation instructions.

-
-

Step 3: Building libtorrent

+
+

Step 3: Building libtorrent

When building libtorrent, the Jamfile expects the environment variable BOOST_ROOT to be set to the boost installation directory. It uses this to find the boost libraries it depends on, so they can be built and their headers @@ -179,7 +179,7 @@ Also, make sure the paths are correct in the different environments. In cygwin, /cygdrive/c/boost_1_34_0). In the windows environment, they should have the typical windows format (c:/boost_1_34_0).

The Jamfile will define NDEBUG when it's building a release build. -For more build configuration flags see Build configurations.

+For more build configuration flags see Build configurations.

Build features:

@@ -325,7 +325,8 @@ the name of the feature, just the value.

When building the example client on windows, you need to build with link=static otherwise you may get unresolved external symbols for some boost.program-options symbols.

-

For more information, see the Boost build v2 documentation.

+

For more information, see the Boost build v2 documentation, or more +specifically the section on builtin features.

To build all possible variants of libtorrent (good for testing when making sure all build variants will actually compile), you can invoke this command:

@@ -336,8 +337,8 @@ character-set=ansi character-set=unicode
 
-
-

building with autotools

+
+

building with autotools

First of all, you need to install automake and autoconf. Many unix/linux systems comes with these preinstalled.

The prerequisites for building libtorrent is boost.thread, boost.date_time @@ -348,11 +349,11 @@ boost.integer, boost.iterator, boost.tuple, boost.array, boost.function, boost.smart_ptr, boost.preprocessor, boost.static_assert.

If you want to build the client_test example, you'll also need boost.regex and boost.program_options.

-
-

Step 1: Generating the build system

+
+

Step 1: Generating the build system

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, -you may skip directly to Step 2: Running configure.

+you may skip directly to Step 2: Running configure.

Execute the following commands, in the given order, to generate the build system:

@@ -364,8 +365,8 @@ autoconf
 

On darwin/OSX you have to run glibtoolize instead of libtoolize.

-
-

Step 2: Running configure

+
+

Step 2: Running configure

In your shell, change directory to the libtorrent directory and run ./configure. This will look for libraries and C++ features that libtorrent is dependent on. If something is missing or can't be found it will print an @@ -413,8 +414,8 @@ checking for main in -lboost_thread... yes directory contains spaces. Make sure you either rename the directories with spaces in their names to remove the spaces or move the libtorrent directory.

-
-

Creating a debug build

+
+

Creating a debug build

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:

@@ -422,8 +423,8 @@ with the following option:

./configure --enable-debug=yes
-
-

Creating a release build

+
+

Creating a release build

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:

@@ -432,8 +433,8 @@ with the following option:

The above option make use of -DNDEBUG, which is used throughout libtorrent.

-
-

Step 3: Building libtorrent

+
+

Step 3: Building libtorrent

Once the configure script is run successfully, you just type make and libtorrent, the examples and the tests will be built.

When libtorrent is built it may be a good idea to run the tests, you do this @@ -447,8 +448,8 @@ make

-
-

building with other build systems

+
+

building with other build systems

If you're making your own project file, note that there are two versions of the file abstraction. There's one file_win.cpp which relies on windows file API that supports files larger than 2 Gigabytes. This does not work in @@ -461,10 +462,10 @@ filenames, so if your target is Windows 2000 and up, you may want to use

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 type" and "Enable Run-Time Type Info" to Yes. For a detailed description -on how to build libtorrent with VS 2005, see this document.

+on how to build libtorrent with VS 2005, see this document.

-
-

build configurations

+
+

build configurations

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