Compiling with MSVC 10.0(dynamic linkage)

sledgehammer999 edited this page Feb 29, 2016 · 8 revisions


We are building qBittorrent on Windows with MSVC compiler instead of MinGW. This choice was made because MinGW does not support wide characters. MSVC compiler also generates smaller executables than MinGW.

  • Download and install Visual C++ 2010 Express
  • Download and install Qt binaries compiled with MSVC (not compiled with MinGW)
  • Add MSVC and Qt bin/ folders (C:\Qt\4.8.2\bin and C:\Program Files\Microsoft Visual Studio 10.0\VC\bin) to the PATH environment variable
  • Download Boost Jam (bjam) and Boost library (v1.42-1.51 are known to work) and unzip them
  • Compile boost using the following command in a terminal (bjam must be in the PATH)
 bjam -q --with-filesystem --with-thread --toolset=msvc variant=release link=static runtime-link=shared 
  • Define BOOST_ROOT environment variable and point to the boost source folder (you will need to close and reopen your terminal window after that)
  • Download OpenSSL v0.9.x and install it
  • Copy OpenSSL include folder (C:\OpenSSL\include\openssl) to MSVC include/ folder (C:\Program Files\Microsoft Visual Studio 10.0\VC\include)
  • Download libtorrent and extract it (v0.14.10-v0.16.0svn are known to work)
  • Compile libtorrent using the following command in a terminal:
 bjam -q --without-python --toolset=msvc variant=release link=static runtime-link=shared logging=none geoip=static dht-support=on boost=source define="BOOST_FILESYSTEM_VERSION=2" encryption=openssl
  • Download a recent qBittorrent
    • GIT repository is located at git://
    • Tarballs are available from sourceforge here
  • Download and install Qt Creator IDE
    • Configure Qt Creator to use Qt-msvc
  • Start QtCreator IDE and load qBittorrent project file (
  • Edit winconf.pri to point to the correct include and lib paths on your file system (boost, libtorrent, OpenSSL)
    • boost libs are generated in boost_1_51\stage\lib
    • libtorrent lib is generated in bin\msvc-10.0express\release\boost-source\geoip-static\link-static\threading-multi\
    • OpenSSL libs are located at C:\OpenSSL\lib\VC as a default
  • Build qBittorrent using QtCreator, it should compile fine!
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.