-
Notifications
You must be signed in to change notification settings - Fork 1
Build Libtorrent
pasenchenko edited this page Nov 3, 2021
·
10 revisions
In this article, we describe how to build libtorrent on different platforms
- Download the source code from http://www.boost.org/users/download/
- Extract in
C:\Program files\Boost
- Run command line as administrator
- In the command line run
cd C:\Program files\Boost\boost_A_B_C
bootstrap.bat
b2 variant=release address-model=64 link=static,shared
Here boost_A_B_C is the downloaded version of Boost (e.g. boost_1_77_0
).
- Add the following paths to
PATH
:
C:\Program Files\Boost\boost_A_B_C
C:\Program Files\Boost\boost_A_B_C\stage\lib
- Create the
BOOST_BUILD_PATH
environment variable with the valueC:\Program Files\Boost\boost_A_B_C
- Download openSSL (NOT Light version) and install it
- Clone libtorrent with its submodules (use
git clone --recurse-submodules link_to_git
) - Run command line as administrator
- In the command line run
cd PATH_TO_LIBTORRENT\bindings\python
python setup.py build
python setup.py install
Here PATH_TO_LIBTORRENT is the folder in which you have cloned libtorrent
Tested on Ubuntu 20.04
- Open Terminal (Ctrl+Alt+T)
- Run the following commands
sudo apt install libboost-all-dev libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc ;" >>~/user-config.jam
b2 crypto=openssl cxxstd=14 release
- In command line run
sudo apt install libssl-dev
- Clone libtorrent with its submodules
git clone --recurse-submodules https://github.com/arvidn/libtorrent.git
- Open the cloned
libtorrent
folder in Terminal - Run
cd ./bindings/python
sudo python setup.py build
sudo python setup.py install