Skip to content

Instantly share code, notes, and snippets.

@shopglobal
Last active March 7, 2018 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shopglobal/74a38b9a79e396f8d528d3a456f6706a to your computer and use it in GitHub Desktop.
Save shopglobal/74a38b9a79e396f8d528d3a456f6706a to your computer and use it in GitHub Desktop.
Windows dependencies helper

Windows: Binaries for Windows are built on Windows using the MinGW toolchain within MSYS2 environment. The MSYS2 environment emulates a POSIX system. The toolchain runs within the environment and cross-compiles binaries that can run outside of the environment as a regular Windows application.

Preparing the build environment

Pre-Install

Download and Install MSYS2

http://msys2.github.io/

Download and install the MSYS2 installer, either the 64-bit or the 32-bit package, depending on your system.

Open the MSYS shell via the MSYS2 Shell shortcut

Update packages using pacman:

pacman -Syuu Exit the MSYS shell using Alt+F4

Edit the properties for the MSYS2 Shell shortcut changing "msys2_shell.bat" to "msys2_shell.cmd -mingw64" for 64-bit builds or "msys2_shell.cmd -mingw32" for 32-bit builds

Restart MSYS shell via modified shortcut and update packages again using pacman:

pacman -Syuu Install dependencies:

To build for 64-bit Windows:

pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium

ToTo build for 32-bit Windows:

pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-zeromq mingw-w64-i686-libsodium Open the MingW shell via MinGW-w64-Win64 Shell shortcut on 64-bit Windows or MinGW-w64-Win64 Shell shortcut on 32-bit Windows. Note that if you are running 64-bit Windows, you will have both 64-bit and 32-bit MinGW shells.

Building

@shopglobal
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment