From bc856b768e24b0d2b5be1f61decc130ca9a69adb Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 15 Apr 2007 03:00:17 +0000 Subject: [PATCH] removed contributed build tutorial in favor of the wiki --- docs/building.html | 28 ++---- docs/building.rst | 25 +----- docs/suse_build_notes.html | 60 ------------- docs/suse_build_notes.rst | 31 ------- docs/ubuntu_6_build_notes.html | 55 ------------ docs/ubuntu_6_build_notes.rst | 29 ------ docs/ubuntu_build_notes.html | 155 --------------------------------- docs/ubuntu_build_notes.rst | 146 ------------------------------- docs/vs2005_build_notes.html | 117 ------------------------- docs/vs2005_build_notes.rst | 92 ------------------- 10 files changed, 10 insertions(+), 728 deletions(-) delete mode 100644 docs/suse_build_notes.html delete mode 100644 docs/suse_build_notes.rst delete mode 100644 docs/ubuntu_6_build_notes.html delete mode 100644 docs/ubuntu_6_build_notes.rst delete mode 100644 docs/ubuntu_build_notes.html delete mode 100644 docs/ubuntu_build_notes.rst delete mode 100644 docs/vs2005_build_notes.html delete mode 100644 docs/vs2005_build_notes.rst diff --git a/docs/building.html b/docs/building.html index 94660f8cc..e70bf61ba 100644 --- a/docs/building.html +++ b/docs/building.html @@ -23,12 +23,11 @@

Table of contents

@@ -41,18 +40,7 @@ You'll find instructions on how to do this #libtorrent IRC channel on irc.freenode.net.

-
-

Contributed build tutorials

- -

These tutorials may work on similar linux distros as well.

-

For Gentoo there is an ebuild called "rb_libtorrent" in portage. Another -Gentoo ebuild is provided by the BTG project.

-
+

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 @@ -85,10 +73,8 @@ usually not set by the package installer).

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_33_1 (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.32 of the boost library +to use the autotools). You'll need at least version 1.33.1 of the boost library in order to build libtorrent.

-

If you use 1.32, you need to download BBv2 separately, so for now, let's -assume you will use version 1.33.1.

Step 2: Setup BBv2

diff --git a/docs/building.rst b/docs/building.rst index 270e2aa9f..4e7078817 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -21,25 +21,9 @@ The build systems supported "out of the box" in libtorrent are boost-build v2 following these instructions, you can usually get help in the ``#libtorrent`` IRC channel on ``irc.freenode.net``. -Contributed build tutorials ---------------------------- +Community contributed build tutorials can be found on the wiki_. -* libtorrent svn, ubuntu_ -* `ubuntu 6.10`_ -* suse_ -* `visual studio 2005`_ - -These tutorials may work on similar linux distros as well. - -.. _ubuntu: ubuntu_build_notes.html -.. _`ubuntu 6.10`: ubuntu_6_build_notes.html -.. _suse: suse_build_notes.html -.. _`visual studio 2005`: vs2005_build_notes.html - -For Gentoo there is an ebuild called "rb_libtorrent" in portage. Another -Gentoo ebuild is provided by the `BTG project`_. - -.. _`BTG project`: http://www.peerweb.nl/gentoo/net-libs/rblibtorrent/ +.. _wiki: http://code.rasterbar.com/libtorrent/wiki/Building building from svn ----------------- @@ -88,12 +72,9 @@ __ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&re 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_33_1`` (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.32 of the boost library +to use the autotools). You'll need at least version 1.33.1 of the boost library in order to build libtorrent. -If you use 1.32, you need to download BBv2 separately, so for now, let's -assume you will use version 1.33.1. - Step 2: Setup BBv2 ~~~~~~~~~~~~~~~~~~ diff --git a/docs/suse_build_notes.html b/docs/suse_build_notes.html deleted file mode 100644 index d7c47f93f..000000000 --- a/docs/suse_build_notes.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - -
- - --- - - - -
Author:Torsten Bergander
-
-

building libtorrent on SuSE 10.1 (i586)

-
    -
  1. -
    Prerequisites
    -

    Install packages boost and boost-devel from packman: -http://packman.links2linux.org/package/boost/10887

    -

    There are standard packages delivered with the distribution. They give -some headaches when building new stuff, so the above mentioned ones fix -these problems. -All other potential prerequisites are available via yast in the standard -distribution.

    -
    -
    -
  2. -
  3. -
    Building and installing the lib
    -

    Get the libtorrent-011 release tarbal, unpack and change into its -directory. Then:

    -
    -./configure --with-boost-date-time=boost_date_time
    ---with-boost-filesystem=boost_filesystem
    ---with-boost-thread=boost_thread-mt --with-boost-regex=boost_regex
    ---with-boost-program-options=boost_program_options --disable-debug
    -make
    -sudo make install
    -
    -

    If you don't give the --with-boost parameters configure does not find -the main in the libs and fails. Also, when later installing e.g. btg, -you have to make sure to use the same parameters there, otherwise it is -bound to fail.

    -
    -
    -
  4. -
-
-
- - diff --git a/docs/suse_build_notes.rst b/docs/suse_build_notes.rst deleted file mode 100644 index f38217327..000000000 --- a/docs/suse_build_notes.rst +++ /dev/null @@ -1,31 +0,0 @@ -:Author: Torsten Bergander - -building libtorrent on SuSE 10.1 (i586) -======================================= - -0. Prerequisites - Install packages ``boost`` and ``boost-devel`` from packman: - http://packman.links2linux.org/package/boost/10887 - - There are standard packages delivered with the distribution. They give - some headaches when building new stuff, so the above mentioned ones fix - these problems. - All other potential prerequisites are available via yast in the standard - distribution. - -1. Building and installing the lib - Get the libtorrent-011 release tarbal, unpack and change into its - directory. Then:: - - ./configure --with-boost-date-time=boost_date_time - --with-boost-filesystem=boost_filesystem - --with-boost-thread=boost_thread-mt --with-boost-regex=boost_regex - --with-boost-program-options=boost_program_options --disable-debug - make - sudo make install - - If you don't give the --with-boost parameters configure does not find - the main in the libs and fails. Also, when later installing e.g. btg, - you have to make sure to use the same parameters there, otherwise it is - bound to fail. - diff --git a/docs/ubuntu_6_build_notes.html b/docs/ubuntu_6_build_notes.html deleted file mode 100644 index ab1701468..000000000 --- a/docs/ubuntu_6_build_notes.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - -
- - --- - - - -
Author:Torsten Bergander
-
-

building libtorrent-0.11 on ubuntu Edy Eft 6.10

-
    -
  1. Install prerequisites (maybe cann be stripped down but it works):

    -
    -sudo apt-get install bjam boost-build libboost-date-time-dev
    -libboost-date-time1.33.1 libboost-filesystem-dev
    -libboost-filesystem1.33.1 libboost-graph-dev libboost-graph1.33.1
    -libboost-iostreams-dev libboost-iostreams1.33.1
    -libboost-program-options-dev libboost-program-options1.33.1
    -libboost-regex-dev libboost-regex1.33.1 libboost-serialization-dev
    -libboost-signals-dev libboost-signals1.33.1 libboost-test-dev
    -libboost-test1.33.1 libboost-thread-dev libboost-thread1.33.1
    -libboost-wave-dev libboost-dev
    -
    -
  2. -
  3. Get release tar ball (0.11 at time of writing), unpack, change into:

    -
    -libtorrent-0.11 dir
    -
    -
  4. -
  5. Build and install:

    -
    -export BOOST_BUILD_PATH=/usr/share/boost-build/tools
    -./configure
    -make
    -sudo make install
    -
    -
  6. -
-
-
- - diff --git a/docs/ubuntu_6_build_notes.rst b/docs/ubuntu_6_build_notes.rst deleted file mode 100644 index 60860b01d..000000000 --- a/docs/ubuntu_6_build_notes.rst +++ /dev/null @@ -1,29 +0,0 @@ -:Author: Torsten Bergander - -building libtorrent-0.11 on ubuntu Edy Eft 6.10 -=============================================== - -1. Install prerequisites (maybe cann be stripped down but it works):: - - sudo apt-get install bjam boost-build libboost-date-time-dev - libboost-date-time1.33.1 libboost-filesystem-dev - libboost-filesystem1.33.1 libboost-graph-dev libboost-graph1.33.1 - libboost-iostreams-dev libboost-iostreams1.33.1 - libboost-program-options-dev libboost-program-options1.33.1 - libboost-regex-dev libboost-regex1.33.1 libboost-serialization-dev - libboost-signals-dev libboost-signals1.33.1 libboost-test-dev - libboost-test1.33.1 libboost-thread-dev libboost-thread1.33.1 - libboost-wave-dev libboost-dev - -2. Get release tar ball (0.11 at time of writing), unpack, change into:: - - libtorrent-0.11 dir - -3. Build and install:: - - export BOOST_BUILD_PATH=/usr/share/boost-build/tools - ./configure - make - sudo make install - - diff --git a/docs/ubuntu_build_notes.html b/docs/ubuntu_build_notes.html deleted file mode 100644 index 032486588..000000000 --- a/docs/ubuntu_build_notes.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - -Building libtorrent on Ubuntu 6.06 - - - - - -
-

Building libtorrent on Ubuntu 6.06

- --- - - - - - - - -
Date:Nov 6, 2006
Authors:Xi Stan -
Francois Dermu
Contact:stan8688@gmail.com
- -
-

Step 1: Acquire the source code from cvs

-

Create a directory for the project:

-
-mkdir ${HOME}/work
-cd ${HOME}/work
-
-

Check out boost, libtorrent, asio source code from cvs -by executing the following commands:

-

No password needed (just hit enter when prompted)

-
-cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost login
-cvs -z3 -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost checkout boost
-cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost logout
-
-cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent login
-cvs -z3 -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent co -P libtorrent
-cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent logout
-
-cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login
-cvs -z3 -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio co -P asio
-cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login
-
-
-
-

Step 2: Building boost

-

To build boost, first build boost-build and then use that to build -the libraries themselves:

-
-BASE_DIR=${HOME} ### Feel free to change this one.
-BOOST_ROOT=${BASE_DIR}/boost
-BOOST_BUILD_PATH=${BOOST_ROOT}/tools/build/v2
-cd ${BOOST_ROOT}/tools/jam/src
-./build.sh
-sudo cp ./bin.linuxx86/bjam /usr/bin
-cd $BOOST_ROOT
-sudo bjam -sTOOLS=gcc install
-
-

It takes about 45 min. (so if you want to grap a coke, now is the time)

-

If you're successful you will see the following files in /usr/local/lib:

-
-libboost_date_time-gcc-d-1_31.so
-libboost_date_time-gcc-mt-d-1_31.so
-libboost_date_time-gcc-1_31.so
-libboost_date_time-gcc-mt-1_31.so
-libboost_date_time-gcc-d-1_31.a
-libboost_date_time-gcc-mt-d-1_31.a
-libboost_date_time-gcc-1_31.a
-libboost_date_time-gcc-mt-1_31.a
-
-
-
-

Step 3: Copy asio into the libtorrent directory

-

Skip this step if you're using a released tarball.

-

Execute the following command:

-
-cp -R ${BASE_DIR}/asio/include/asio* ${BASE_DIR}/libtorrent/include/libtorrent
-
-
-
-

Step 4: Building libtorrent

-
-

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 are -boost.thread, boost.date_time and boost.filesystem. Those are the compiled 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.

-

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

-
-
-

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 running configure.

-

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

-
-cd ${BASE_DIR}/libtorrent
-CXXFLAGS="-I/usr/local/include/boost-1_35 -I${BASE_DIR}/libtorrent/include/libtorrent"
-LDFLAGS=-L/usr/local/lib
-
-aclocal -I m4
-autoheader
-libtoolize --copy --force
-automake --add-missing --copy --gnu
-autoconf
-
-

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

-
-
-

running configure

-

To use the auto tools to build libtorrent, execute the following commands:

-
-cd ${BASE_DIR}/libtorrent
-CXXFLAGS="-I/usr/local/include/boost-1_35 -I${BASE_DIR}/libtorrent/include/libtorrent"
-LDFLAGS=-L/usr/local/lib
-
-./configure --with-boost-date-time=boost_date_time-gcc \
---with-boost-filesystem=boost_filesystem-gcc \
---with-boost-thread=boost_thread-gcc-mt
-
-make
-sudo make install
-
-

If successful, you will see the following files:

-
-/usr/local/lib/libtorrent.a
-/usr/local/lib/libtorrent.so.0
-/usr/local/lib/libtorrent.la
-/usr/local/lib/libtorrent.so.0.1.0
-/usr/local/lib/libtorrent.so
-
-
-
-
- - diff --git a/docs/ubuntu_build_notes.rst b/docs/ubuntu_build_notes.rst deleted file mode 100644 index 269283ae1..000000000 --- a/docs/ubuntu_build_notes.rst +++ /dev/null @@ -1,146 +0,0 @@ -================================== -Building libtorrent on Ubuntu 6.06 -================================== - -:Date: Nov 6, 2006 -:Authors: Xi Stan, Francois Dermu -:Contact: stan8688@gmail.com - - -Prerequisites -============= - -To build libtorrent, you need the following libraries: - -* http://www.rasterbar.com/products/libtorrent/index.html -* http://www.boost.org -* http://asio.sourceforge.net/ - -Step 1: Acquire the source code from cvs -======================================== - -Create a directory for the project:: - - mkdir ${HOME}/work - cd ${HOME}/work - -Check out ``boost``, ``libtorrent``, ``asio`` source code from cvs -by executing the following commands: - -*No password needed (just hit enter when prompted)* - -:: - - cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost login - cvs -z3 -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost checkout boost - cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost logout - - cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent login - cvs -z3 -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent co -P libtorrent - cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent logout - - cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login - cvs -z3 -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio co -P asio - cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login - -Step 2: Building boost -====================== - -To build boost, first build boost-build and then use that to build -the libraries themselves: - -.. parsed-literal:: - - BASE_DIR=${HOME} *### Feel free to change this one.* - BOOST_ROOT=${BASE_DIR}/boost - BOOST_BUILD_PATH=${BOOST_ROOT}/tools/build/v2 - cd ${BOOST_ROOT}/tools/jam/src - ./build.sh - sudo cp ./bin.linuxx86/bjam /usr/bin - cd $BOOST_ROOT - sudo bjam -sTOOLS=gcc install - -*It takes about 45 min. (so if you want to grap a coke, now is the time)* - - -If you're successful you will see the following files in ``/usr/local/lib``:: - - libboost_date_time-gcc-d-1_31.so - libboost_date_time-gcc-mt-d-1_31.so - libboost_date_time-gcc-1_31.so - libboost_date_time-gcc-mt-1_31.so - libboost_date_time-gcc-d-1_31.a - libboost_date_time-gcc-mt-d-1_31.a - libboost_date_time-gcc-1_31.a - libboost_date_time-gcc-mt-1_31.a - -Step 3: Copy asio into the libtorrent directory -=============================================== - -Skip this step if you're using a released tarball. - -Execute the following command:: - - cp -R ${BASE_DIR}/asio/include/asio* ${BASE_DIR}/libtorrent/include/libtorrent - -Step 4: Building libtorrent -=========================== - -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 are -boost.thread, boost.date_time and boost.filesystem. Those are the *compiled* 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. - -If you want to build the client_test example, you'll also need boost.regex and boost.program_options. - -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 `running configure`_. - -Execute the following commands, in the given order, to generate the build system:: - - cd ${BASE_DIR}/libtorrent - CXXFLAGS="-I/usr/local/include/boost-1_35 -I${BASE_DIR}/libtorrent/include/libtorrent" - LDFLAGS=-L/usr/local/lib - - aclocal -I m4 - autoheader - libtoolize --copy --force - automake --add-missing --copy --gnu - autoconf - -On darwin/OSX you have to run glibtoolize instead of libtoolize. - -running configure ------------------ - -To use the auto tools to build libtorrent, execute the following commands:: - - cd ${BASE_DIR}/libtorrent - CXXFLAGS="-I/usr/local/include/boost-1_35 -I${BASE_DIR}/libtorrent/include/libtorrent" - LDFLAGS=-L/usr/local/lib - - ./configure --with-boost-date-time=boost_date_time-gcc \ - --with-boost-filesystem=boost_filesystem-gcc \ - --with-boost-thread=boost_thread-gcc-mt - - make - sudo make install - -If successful, you will see the following files:: - - /usr/local/lib/libtorrent.a - /usr/local/lib/libtorrent.so.0 - /usr/local/lib/libtorrent.la - /usr/local/lib/libtorrent.so.0.1.0 - /usr/local/lib/libtorrent.so - diff --git a/docs/vs2005_build_notes.html b/docs/vs2005_build_notes.html deleted file mode 100644 index e1f599327..000000000 --- a/docs/vs2005_build_notes.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - -libtorrent setup for VS.NET 2005 Development - - - - -
-

libtorrent setup for VS.NET 2005 Development

- --- - - - - - -
Author:THOMAS GODDARD
Contact:www.thomasgoddard.com
-
-

Prerequisites

-
    -
  1. Download boost from boost.org
  2. -
  3. Download libtorrent
  4. -
  5. Extract both to a folder called libtorrent
  6. -
-
-
-

Compiling boost for VS.NET 2005

-
    -
  1. Copy bjam.exe to libtorrent\boost_[version]\tools\build
  2. -
  3. Add the path "libtorrent\boost_[version]\tools\build" to the windows path environment variable
  4. -
  5. Log off / log back on
  6. -
  7. Open the file "libtorrent\boost_[version]\tools\build\user-config.jam" in notepad
  8. -
  9. Uncomment the # using msvc; line by removing the #
  10. -
  11. Replace the line with: using vc-8_0 ;
  12. -
  13. Save the file and close it
  14. -
  15. Open the visual studio .net command line in the VS.net 2005 folder in your start menu
  16. -
  17. CD to the "libtorrent\boost_[version]" folder
  18. -
  19. Type: bjam "-sTOOLS=vc-8_0" install and hit enter
  20. -
  21. Be patient and wait for it to finish
  22. -
-
-

Troubleshooting

-
    -
  • Make sure to CD to the root of the boost directory before running the install.
  • -
  • For additional details and information on using Visual Studio 2005 Express addition, see the Boost Getting Started Guide.
  • -
-
-
-
-

Setting up and compiling libtorrent with VS.NET 2005

-
    -
  1. Create a new vs.net 2005 MFC project and solution file in the root of the libtorrent folder where you extracted all of the libtorrent files.

    -
  2. -
  3. Include the files contained in the src folder, excluding the makefiles. -NOTE: -Only include either file.cpp or file_win.cpp. Read here to determine which file to include: -http://www.rasterbar.com/products/libtorrent/docs.html#building-with-other-build-systems

    -
  4. -
  5. Include all .c files in the zlib folder.

    -
  6. -
  7. Add the following Additional Include Header Files:

    -
    -"libtorrent\include"
    -"C:\Boost\include\boost-1_33_1"
    -"libtorrent\zlib"
    -"libtorrent\include\libtorrent"
    -
    -
  8. -
  9. 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
    -
    -
  10. -
  11. Add C:\Boost\lib to Additional Library Directories

    -
  12. -
  13. Add the following Additional Dependencies:

    -
    -wsock32.lib
    -libboost_thread-vc80-mt.lib
    -libboost_filesystem-vc80-mt.lib
    -libboost_date_time-vc80-mt.lib
    -
    -
  14. -
  15. Set the Runtime Library to Multi-threaded Debug DLL (/MDd) under the code generation section.

    -
  16. -
-
-

Troubleshooting

-
-
Error: error LNK2005:already defined etc...
-
Make sure you use the Multi-threaded Debug DLL (/MDd)
-
Error: error linking zlib related files...
-
Make sure to include all .c files in the zlib folder.
-
Runtime error in client_test.exe
-
If you're using boost-1.33.1, there is a bug in the program options -library which will make VS.NET 2005 assert. For a patch, see: -http://thread.gmane.org/gmane.comp.lib.boost.devel/140932/focus=140932
-
-
-
-
- - diff --git a/docs/vs2005_build_notes.rst b/docs/vs2005_build_notes.rst deleted file mode 100644 index c4980e086..000000000 --- a/docs/vs2005_build_notes.rst +++ /dev/null @@ -1,92 +0,0 @@ -============================================ -libtorrent setup for VS.NET 2005 Development -============================================ - -:Author: THOMAS GODDARD -:Contact: www.thomasgoddard.com - -Prerequisites -------------- - -1. Download boost from boost.org -2. Download libtorrent -3. Extract both to a folder called libtorrent - -Compiling boost for VS.NET 2005 -------------------------------- - -1. Copy bjam.exe to libtorrent\\boost_[version]\\tools\\build -2. Add the path "libtorrent\\boost_[version]\\tools\\build" to the windows path environment variable -3. Log off / log back on -4. Open the file "libtorrent\\boost_[version]\\tools\\build\\user-config.jam" in notepad -5. Uncomment the ``# using msvc;`` line by removing the # -6. Replace the line with: ``using vc-8_0 ;`` -7. Save the file and close it -8. Open the visual studio .net command line in the VS.net 2005 folder in your start menu -9. CD to the "libtorrent\\boost_[version]" folder -10. Type: ``bjam "-sTOOLS=vc-8_0" install`` and hit enter -11. Be patient and wait for it to finish - -Troubleshooting -............... - -* Make sure to CD to the root of the boost directory before running the install. - -* For additional details and information on using Visual Studio 2005 Express addition, see the Boost Getting Started Guide. - -Setting up and compiling libtorrent with VS.NET 2005 ------------------------------------------------------ - -1. Create a new vs.net 2005 MFC project and solution file in the root of the libtorrent folder where you extracted all of the libtorrent files. -2. Include the files contained in the src folder, excluding the makefiles. - **NOTE:** - Only include either file.cpp or file_win.cpp. Read here to determine which file to include: - http://www.rasterbar.com/products/libtorrent/docs.html#building-with-other-build-systems - -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:: - - 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. - - -Troubleshooting -............... - -Error: error LNK2005:already defined etc... - Make sure you use the Multi-threaded Debug DLL (/MDd) - -Error: error linking zlib related files... - Make sure to include all .c files in the zlib folder. - -Runtime error in client_test.exe - If you're using boost-1.33.1, there is a bug in the program options - library which will make VS.NET 2005 assert. For a patch, see: - http://thread.gmane.org/gmane.comp.lib.boost.devel/140932/focus=140932 -