aboutsummaryrefslogtreecommitdiff

Building COIN Linear Programming Library for Windows

Building COIN Linear Programming library for Windows requires additional components beyond the standard Simply Fortran compiler suite. The following outlines the steps for building COIN Linear Programming on Windows.

Requirements

To build COIN-LP, the following tools must be available:

  • Bash
  • GNU Make
  • pkg-config
  • Simply Fortran

The quickest way to get everything working is to use MinGW W64 via MSYS2. The download is available from the MSYS2 site. Simply Fortran is available from its Download page

MSYS2 Requirements Setup

After installing MSYS2, you'll need to execute the following command to install requirements from within MSYS2 (available now in the Start menu after installation):

pacman -S pkg-config make

Downloads

Building COIN-LP requires two source archives: CoinUtils and Clp. Both are available from GitHub:

  • CoinUtils: https://github.com/coin-or/CoinUtils/releases
  • Clp: https://github.com/coin-or/Clp/releases

These appropriate archives should be extracted into a sensible directory. This action should create two new directories. For example, if the current versions of CoinUtils and Clp are 2.11.4 and 1.17.6 respectively, there should now be two directories named:

  • CoinUtils-releases-2.11.4
  • Clp-releases-1.17.6

A GNU Makefile is provided in this directory to handle automatically building everything. Copy this Makefile to the directory containing these two subdirectories as well.

Building

First, start the MSYS2 shell from the Start menu.

To ensure compatibility with Simply Fortran, its compiler should be used to build the libraries. Because MSYS2 doesn't import the full Windows path, you'll need to manually set the path using the command:

export PATH= /c/Program\ Files\ \(x86\)/Simply\ Fortran\ 3/mingw-w64/bin:$PATH

Next, navigate to the directory where the COIN-LP libraries were extracted above. MSYS2 addresses Windows drives simply as root directories in UNIX-like format; "C:" would be known as "/c" and so on. For example, if you've extracted the archives to C:\Users\jeff\Fortran\clp, enter the command:

cd /c/Users/jeff/Fortran/clp

If you've copied the Makefile to this directory as explained above, you can now simply type:

make install

After a few moments, depending on your system, there should now be an install subdirectory containing the products of the build procedure. Within the install/lib directory will be:

  • libClp.a
  • libClpSolver.a
  • libCoinUtils.a

which are the libraries necessary for building applications using COIN-LP.


by Jeff Armstrong (jeff@approximatrix.com)

Initial Release: 2020-10-15