This tutorial is based on the topic of our friend nitrogenetics, which is found at the link.System used in the tutorial: Windows 10 x64 / build 19042.746 / version 20H2
System Preparation01 - Install Msys2 Shell:
Download:
https://www.msys2.org/02 - Update Msys2
After downloading and installing the program, run the msys2.exe application and run the following commands:
As soon as the first update is performed, close and reopen msys2.exe. Run the commands:
pacman -Su
pacman -S git make
pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain \
git subversion mercurial \
mingw-w64-i686-cmake mingw-w64-x86_64-cmake
pacman -S mingw-w64-x86_64-make mingw-w64-i686-make
pacman -S mingw-w64-x86_64-zlib mingw-w64-i868-zlib
Add the MinGW path to the system variables, being added to the PATH option of the operating system. In Windows 10 the path should look like the example below:
32BITS64BITSDownload, extract and build the dependencies:
Create two dependency folders called deps_x86 and deps_x64 on disk C :.
All dependencies will be installed inside these folders.
01 - Download and installation - OPENSSL 1.1.1h:
Download the file below in the dependencies folder and open Msys2 MinGW 64-bit or Msys2 MinGW 32-bit according to the system choice for compilation
https://www.openssl.org/source/openssl-1.1.1h.tar.gzThen enter the codes below in the command window that will open.
32BITScd /c/deps_x86/
tar xvfz openssl-1.1.1h.tar.gz
cd openssl-1.1.1h
./configure mingw
make
64BITScd /c/deps_x64/
tar xvfz openssl-1.1.1h.tar.gz
cd openssl-1.1.1h
./configure mingw64
make
02 - Download and installation - Berkeley DB:
Download the file below in the dependencies folder and open Msys2 MinGW 64-bit or Msys2 MinGW 32-bit according to the system choice for compilation
http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gzThen enter the codes below in the command window that will open.
32BITScd /c/deps_x86/
tar xvfz db-4.8.30.tar.gz
cd db-4.8.30/build_unix
../dist/configure --enable-mingw --enable-cxx --disable-shared --disable-replication
make
64BITScd /c/deps_x64/
tar xvfz db-4.8.30.tar.gz
cd db-4.8.30/build_unix
../dist/configure --enable-mingw --enable-cxx --disable-shared --disable-replication
make
03 - Download and install - 7-zip:
Download:
https://www.7-zip.org/download.html04 - Download and install - Boost 1.65:
Download and extract the folder in the dependencies directory.
https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.zipThen open the Windows command prompt and enter the codes below.
32BITScd C:\deps_x86\boost_1_65_1\
bootstrap.bat gcc
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc variant=release link=static threading=multi runtime-link=static stage
64BITScd C:\deps_x64\boost_1_65_1\
bootstrap.bat gcc
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc variant=release link=static threading=multi runtime-link=static stage
05 - Download and installation - Miniupnpc:
Download and extract the folder in the dependencies directory.
http://miniupnp.free.fr/files/download.php?file=miniupnpc-2.1.tar.gzAfter extracting the files, rename the miniupnpc-2.1 folder to miniupnpc.
Then open the Windows command prompt and enter the codes below.
32BITScd C:\deps_x86\miniupnpc
mingw32-make -f Makefile.mingw init upnpc-static
64BITScd C:\deps_x64\miniupnpc
mingw32-make -f Makefile.mingw init upnpc-static
06 - Download and installation - Protoc and Libprotobuf:
Download and extract the folder in the dependencies directory.
https://github.com/protocolbuffers/protobuf/releases/download/v3.7.0/protobuf-all-3.7.0.zipExtract the files using 7-zip.
Open Msys2 MinGW 64-bit. Then enter the codes below in the command window that will open.
32BITScd /c/deps_x86/
cd protobuf-3.7.1
./configure --disable-shared
make
64BITScd /c/deps_x64/
cd protobuf-3.7.1
./configure --disable-shared
make
07 - Download and install - Qrencode:
Download the file below in the dependencies folder and open Msys2 MinGW 64-bit or Msys2 MinGW 32-bit according to the system choice for compilation
http://download.sourceforge.net/libpng/libpng-1.6.36.tar.gzThen enter the codes below in the command window that will open.
32BITScd /c/deps_x86/
tar xvfz libpng-1.6.36.tar.gz
cd libpng-1.6.36
./configure --disable-shared
make
cp .libs/libpng16.a .libs/libpng.a
64BITScd /c/deps_x64/
tar xvfz libpng-1.6.36.tar.gz
cd libpng-1.6.36
./configure --disable-shared
make
cp .libs/libpng16.a .libs/libpng.a
Download the file below in the dependencies folder and open Msys2 MinGW 64-bit or Msys2 MinGW 32-bit according to the system choice for compilation
http://fukuchi.org/works/qrencode/qrencode-4.0.2.tar.gzThen enter the codes below in the command window that will open.
32BITScd /c/deps_x86/
tar xvfz qrencode-4.0.2.tar.gz
cd qrencode-4.0.2
LIBS="../libpng-1.6.36/.libs/libpng.a ../../msys64/mingw64/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.36" \
png_LIBS="-L../libpng-1.6.36/.libs" \
./configure --enable-static --disable-shared --without-tools
make
64BITScd /c/deps_x64/
tar xvfz qrencode-4.0.2.tar.gz
cd qrencode-4.0.2
LIBS="../libpng-1.6.36/.libs/libpng.a ../../msys64/mingw32/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.36" \
png_LIBS="-L../libpng-1.6.36/.libs" \
./configure --enable-static --disable-shared --without-tools
make
08 - Download and installation - Qt 5:
Download QT OpenSource.
https://download.qt.io/official_releases/qt/5.12/5.12.10/single/qt-everywhere-src-5.12.10.zipExtract the file using 7-zip. Rename the qt-everywhere-src-5.12.10 folder to 5.12.10.
Create two folders called QT_x86 and QT_x64 on disk C :, copy folder 5.12.10 to the folders created earlier.
Then open the Windows command prompt and enter the codes below.
32BITScd C:\Qt_x86\5.12.10
configure.bat -release -opensource -confirm-license -static -make libs -no-sql-sqlite -no-opengl -nomake examples -no-icu -no-gif -no-libjpeg -no-freetype -no-angle -system-zlib -openssl -I C:\deps_x86\openssl-1.1.1h\include -L C:\deps_x86\openssl-1.1.1h
mingw32-make
64BITScd C:\Qt_x64\5.12.10
configure.bat -release -opensource -confirm-license -static -make libs -no-sql-sqlite -no-opengl -nomake examples -no-icu -no-gif -no-libjpeg -no-freetype -no-angle -system-zlib -openssl -I C:\deps_x64\openssl-1.1.1h\include -L C:\deps_x64\openssl-1.1.1h
mingw32-make
Note¹: Consider using -j with mingw32-make to speed up compilation. QuadCore -j4 or -j5 processors have had good results.
Note²: Dependency versions may vary depending on the currency being used.