There are several ways to install IPOPT on Windows systems. The first two options, described in Sections 2.5.1 and 2.5.2, are to use Cygwin (see http://www.cygwin.com), which offers a comprehensive UNIX-like environment on Windows and in which the installation procedure described earlier in this section can be used. If you want to use the (free) GNU compilers, follow the instructions in Section 2.5.1. If you have the Microsoft C++ compiler and possibly a ``native'' Fortran compiler (e.g., the Intel Fortran compiler) and want to use those to compile IPOPT, please see Section 2.5.2. If you use MSYS/MinGW (a light-weight UNIX-like environment for Windows), please consider the notes in Section 2.5.3. If you want to compile the IPOPT mex interface to MATLAB, then we recommend to use the MSYS/MinGW option.
Note: Some binaries for IPOPT are available on the COIN-OR website at http://www.coin-or.org/download/binary/Ipopt. There, also precompiled versions of IPOPT as DLLs (generated from the MSVS solution in IPOPT's subdirectory $IPOPTDIR/Ipopt/MSVisualStudio/v8-ifort) are available. Look at the README files for details. An example how to use these DLLs from your own MSVS project is in $IPOPTDIR/Ipopt/MSVisualStudio/BinaryDLL-Link-Example.
Cygwin is a Linux-like environment for Windows; if you don't know what it is you might want to have a look at the Cygwin homepage, http://www.cygwin.com.
It is possible to build the IPOPT AMPL solver executable in Cygwin for general use in Windows. You can also hook up IPOPT to your own program if you compile it in the Cygwin environment10.
If you want to compile IPOPT under Cygwin, you first have to install Cygwin on your Windows system. This is pretty straight forward; you simply download the ``setup'' program from http://www.cygwin.com and start it.
Then you do the following steps (assuming here that you don't have any complications with firewall settings etc - in that case you might have to choose some connection settings differently):
in the correct directories, and hopefully that will work. The IPOPT AMPL solver executable will be in the subdirectory bin (called ``ipopt.exe''). If you want to set the installation, type
This section describes how you can compile IPOPT with the Microsoft Visual C++ compiler under Cygwin. Here you have two options for compiling the Fortran code in the third party dependencies:
Once you have settled on this, do the following:
call "C: Program Files Microsoft Visual Studio 8 VC vcvarsall.bat"
On my computer, this sets the environment variables so that I can use the MSVC++ compiler.
If you want to use also a native Fortran compiler, you need to include something like this
call "C: Program Files Intel Fortran compiler80 IA32 BIN ifortvars.bat"
You might have to search around a bit. The important thing is that, after your change, you can type ``cl'' in a newly opened Cygwin windows, and it finds the Microsoft C++ compiler (and if you want to use it, the Fortran compiler, such as the Intel's ifort).
Make sure the last message is
Main Ipopt configuration successful
test the installation with
and install everything with
You can compile IPOPT also under MSYS/MinGW, which is another, more light-weight UNIX-like environment for Windows. It can be obtained from http://www.mingw.org/.
If you want to use MSYS/MinGW to compile IPOPT with native Windows compilers (see Section 2.5.2), all you need to install is the basic version11. If you also want to use the GNU compilers, you need to install those as well, of course.
A compilation with the GNU compilers works just like with any other UNIX system, as described in Section 2.4. That is, during the installation, select (at least) the C Compiler, C++ Compiler, Fortran Compiler, MSYS Basic System, and the MinGW Developer ToolKit. Additionally, wget and unzip should be installed with the following command in an MSYS terminal:
mingw-get install msys-wget msys-unzip
If you want to use the native MSVC++ compiler (with f2c or a native Fortran compiler), you essentially follow the steps outlined in Section 2.5.2. Additionally, you need to make sure that the environment variables are set for the compilers (see step 2), this time adding the line to the msys.bat file.
For a 64-bit build, you will need to install also a MinGW-64 distribution. We recommend TDM-GCC, which is available from http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-webdl.exe/download. Install MinGW-64 in a different folder than your existing 32-bit MinGW installation! The components you need are: core (under gcc), c++ (under gcc), fortran (under gcc), openmp (under gcc, necessary if you want to use any multi-threaded linear solvers), binutils, and mingw64-runtime.
After MinGW-64 is installed, open the file C: MinGW msys 1.0 etc fstab, and replace the line
C:\MinGW64\ /mingw(Replace paths with your installation locations if different.)