[Coin-discuss] Native Windows build

marco tacconi marco.tacconi at studenti.unimi.it
Thu Mar 23 12:03:14 EST 2006


Dear COIN-OR team/users,
first of all sorry for my english...

I found an easy way to build the COIN-OR framework on Windows XP without using
Visual C++ nor CYGWIN.
We need only MinGW, UnxUtils and a NTFS filesystem.
Tested on Windows XP SP2.

Steps:

1) Download the following packages:
1a) MinGW core from http://prdownloads.sf.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download 
1b) MinGW g++ from http://prdownloads.sf.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download
1c) MinGW runtime from http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download
1d) MinGW win32api (not sure if is needed) from http://prdownloads.sf.net/mingw/w32api-3.6.tar.gz?download
1e) MinGW binutils from http://prdownloads.sf.net/mingw/binutils-2.15.91-20040904-1.tar.gz?download
1f) MinGW make from http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.tar.gz?download
Extract all packages in a directory, e.g. C:\MinGW
Copy C:\MinGW\bin\mingw32-make.exe to C:\MinGW\bin\make.exe
Add C:\MinGW\bin to the PATH environment variable

2) Download the following packages:
2a) UnxUtils from http://unxutils.sourceforge.net/UnxUtils.zip
2b) UnxUpdates from http://unxutils.sourceforge.net/UnxUpdates.zip
Extract UnxUtils in a directory, e.g. C:\UnxUtils
Extract UnxUpdates in C:\UnxUtils\usr\local\wbin overwriting existing files
Copy C:\UnxUtils\usr\local\wbin\zsh.exe to C:\UnxUtils\usr\local\wbin\sh.exe
Add C:\UnxUtils\usr\local\wbin to the PATH environment variable

3) Now we need the COIN-OR framework, download http://www.coin-or.org/Tarballs/COIN_2006Mar23.tgz
Extract the package in a directory without spaces on a NTFS filesystem, e.g. C:\

4) Edit C:\COIN\Makefiles\Makefile.location adjusting the CoinDir variable, e.g. CoinDir ?= C:/COIN

5) Copy C:\COIN\Makefiles\Makefile.CYGWIN to C:\COIN\Makefiles\Makefile.WindowsNT
Optionally edit this file and change the line $(warning "Shared libs are not (yet!) supported on CYGWIN") to $(warning "Shared libs are not (yet!) supported on WindowsNT")

6) Now we are ready to compile COIN-OR modules.
Open the command prompt and enter in the directory of the COIN-OR module of interest, e.g. cd C:\COIN\Clp
Optionally edit the makefile of the module, e.g. C:\COIN\Clp\Makefile.Clp adjusting the variables LibType and OptLevel
Launch make.exe this will build the module and relative dependencies.

Compiled modules will be copied in C:\COIN\lib and in C:\COIN\include will be copied the header files.

Know issue:
The command make unittest in C:\COIN\Clp fail because it try to execute "cp -a WindowsNT-g/clp .." instead of "cp -a WindowsNT-g/clp.exe .."

I think that these instructions can be useful for other people, so I would be happy if, after a period of test and corrections, them enter in the official COIN-OR documentation.

Regards.

Marco Tacconi




More information about the Coin-discuss mailing list