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
Following the above steps, you should have the bash command (with Msys2, be sure to run msys2_shell.bat or manually add msys64 usr bin, msys64 mingw32 bin, and msys64 mingw64 bin 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@\VERThe 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 bin to your Windows executable search PATH, or, alternatively, copy the conents of the build directory to C: Program Files (x86) SYMPHONY and add the directory C: Program Files (x86) SYMPHONY bin to your Windows executable search PATH. You may also consider adding C: Program Files (x86) SYMPHONY lib to the LIB path and C: Program Files (x86) SYMPHONY include 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