Instructions to compile qBittorrent in MSYS2 environment
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


How to Compile qBittorrent in MSYS2

This guide is to help developers setup development environment quickly.

Warning! the compilation will require ~10 GB of free space to compile & run qBittorrent (dynamically linked).


1. Install msys2

Refer to

2. Download PKGBUILD

Depending on your intention, download one PKGBUILD from the links below and put it into a clean folder.

3. Install Dependencies & Build!

If you want to build a x64 application then open MSYS2 MinGW 64-bit in Windows start menu.
Otherwise open MSYS2 MinGW 32-bit.

First make sure msys2 is up-to-date by running the following command a few times, until it tells you all packages are latest:

pacman --sync --refresh --sysupgrade

Install development tools:

pacman --sync --noconfirm autoconf automake binutils make mingw-w64-x86_64-gcc  # note: change to mingw-w64-i686-gcc when building for 32-bit

Start building qBittorrent:

cd <PKGBUILD_directory>
makepkg --skippgpcheck --syncdeps --noconfirm

4. Install & Run

After the command complete, you should see makepkg created a package: mingw-w64-x86_64-qbittorrent-4.0.1-1-any.pkg.tar.xz. The architecture & version number may be different.


pacman -U mingw-w64-x86_64-qbittorrent-4.0.1-1-any.pkg.tar.xz

Run (in the same console):


You can find the downloaded qBittorrent source code in <PKGBUILD_directory>/src/qbittorrent.