[Ipopt] Ipopt config and FORTRAN_INTEGER_TYPE

David Wilkinson xyz-coin at effisols.com
Thu May 11 10:21:09 EDT 2017

I have been trying to compile latest Bonmin 1.8.4, which includes Ipopt 3.12.4, 
on Microsoft Visual Studio.

I started with some older Visual Studio project files, which were working with 
Bonmin 1.3.2, and received a lot of errors related to the symbols BONMIN_BUILD, 
IPOPT_BUILD etc., which were not used in Bonmin 1.32.

I was able to eliminate almost all the errors by suitable definition of these 
symbols in the various projects, but there was one issue related to the 
FORTRAN_INTEGER_TYPE symbol that remained..

This symbol is defined (as int) in Ipopt\src\Common\config_default.h but not in 
Ipopt\src\Common\config_ipopt_default.h. Therefore if IPOPT_BUILD is not defined 
(as in the libBonmin project), there is a compilation failure in the statement

typedef FORTRAN_INTEGER_TYPE ipfint;

which appears in Ipopt\src\Common\IpTypes.hpp

Bottom line:

There needs to be a definition of FORTRAN_INTEGER_TYPE in 

I had a friend compile Bonmin/Ipopt on Linux, and the generated 
Ipopt\src\Common\config.h and Ipopt\src\Common\config_ipopt.h both contain the line


I hope this simple fix to Ipopt\src\Common\config_ipopt_default.h can be made in 
the next version.

Otherwise the only way to proceed on Visual Studio without changing source code 
is to put FORTRAN_INTEGER_TYPE=int in the preprocessor symbols of the Visual 
Studio libBonmin project (or to define IPOPT_BUILD, which seems wrong).


David Wilkinson

More information about the Ipopt mailing list