Building on Windows.

By far, the easiest way to build on Windows is with the GNU autotools and the GCC compilers. The first step is to install either

If you don't want to fool around with WSL (which is a great option if you already know your way around Unix), it is recommended to use MSys2, since it provides a minimal toolset that is easy to install. To get MSys2, download the installer from https://msys2.github.io/.

Following the above steps, you should have the bash command (with Msys2, be sure to run msys2_shell.bat or manually add msys64 \bgroup\color{brown}$ \backslash$\egroupusr \bgroup\color{brown}$ \backslash$\egroupbin, msys64 \bgroup\color{brown}$ \backslash$\egroupmingw32 \bgroup\color{brown}$ \backslash$\egroupbin, and msys64 \bgroup\color{brown}$ \backslash$\egroupmingw64 \bgroup\color{brown}$ \backslash$\egroupbin to your Windows path).

Once you have bash installed and in your PATH, open a Windows terminal and type

bash
pacman -S make wget tar patch dos2unix diffutils git svn pkg-config zip unzip

To obtain the source code, the first step is to get the installer that will then fetch the source for SYMPHONY and all its dependencies. *You do not need to clone SYMPHONY first, just do the following!* Open a terminal and execute

git clone https://www.github.com/coin-or/coinbrew

Next, to check out source code for and build all the necessary projects (including dependencies), execute the script in the coinbrew subdirectory. To execute the script, do

cd coinbrew
chmod u+x coinbrew
./coinbrew

(Note: The chmod command is only needed if the execute permission is not automatically set by git on cloning). Once you run the script, you will be prompted interactively to select a project to fetch and build. the rest should happen automagically. Alternatively, the following command-line incantation will execute the procedure non-interactively.

./coinbrew fetch build SYMPHONY@\VER
The coinbrew script invokes a separate configure script that is auto-generated using the GNU autotools. This script takes a wide range of additional options and these options can be specified on the commnd-line when running coinbrew. For example, to build with debugging symbols, do

./coinbrew fetch build SYMPHONY@\VER --enable-debug

To get help with additional options available in running the script, do

./coinbrew --help

To use the resulting binaries and/or libraries, you will need to add the full path of the directory build \bgroup\color{brown}$ \backslash$\egroupbin to your Windows executable search PATH, or, alternatively, copy the conents of the build directory to C: \bgroup\color{brown}$ \backslash$\egroupProgram Files (x86) \bgroup\color{brown}$ \backslash$\egroupSYMPHONY and add the directory C: \bgroup\color{brown}$ \backslash$\egroup Program Files (x86) \bgroup\color{brown}$ \backslash$\egroupSYMPHONY \bgroup\color{brown}$ \backslash$\egroupbin to your Windows executable search PATH. You may also consider adding C: \bgroup\color{brown}$ \backslash$\egroupProgram Files (x86) \bgroup\color{brown}$ \backslash$\egroupSYMPHONY \bgroup\color{brown}$ \backslash$\egrouplib to the LIB path and C: \bgroup\color{brown}$ \backslash$\egroupProgram Files (x86) \bgroup\color{brown}$ \backslash$\egroupSYMPHONY \bgroup\color{brown}$ \backslash$\egroupinclude to the INCLUDE path.

It is possible to use almost the exact same commands to build with the Visual Studio compilers. Before doing any of the above commands in the Windows terminal, first run the vcvarsall.bat script for your version of Visual Studio. Then follow all the steps above, but add –enable-msvc to the coinbrew command.

./coinbrew fetch build SYMPHONY@\VER --enable-msvc