[Ipopt] Some dirty fixes for compiling Ipopt examples on MinGW

milen at fmi.uni-sofia.bg milen at fmi.uni-sofia.bg
Tue Aug 11 10:39:39 EDT 2009


Dear All,

For whatever it might be worth, I would like to share some quick
workarounds I found by trial and error.

I am on Windows XP (32 bit), no Intel Fortran compiler, so the complexity
of Mumps left me with no option than to try and get Unix route work. Since
cygwin annoyed me to tears I switched to MinGW.

The official installer of MinGW does not work due to some sourceforge bug,
so one should either install manually, or use 
http://www.tdragon.net/recentgcc/. I did the latter. Note that since
gfortran is needed for Fortran 90 Mumps, it seems that gcc.4... is a good
option.

MYSYS installs no problem from the recent auto-installer. For minimal
configuration (SVN and wget) see e.g.
http://wiki.openttd.org/Compiling_on_MinGW. For some reason one should
avoid rm /usr/local/bin/wget.exe there.

After that I followed the Ipopt manual and up to "make test" everything
was just fine. It turned out that I need to reconfigure with C++ runtime
libraries (according to the manual) but since this would take a lot of
time, I played around.

The dirty fixes are:

1/ Remove -libgcc_s from Makefile to avoid duplicating some references.
2/ In ../build/include/coin/IpTNLP.hpp add
#include <stdio.h>
to shut up the complains that printf is undefined. (IpTNLP.hpp is included
almost everywhere).

In this way I got ../examples/ScalableProblems working. The bonus is that
- unlike cygwin - I can start the .exe from Windows command line. Of
course, the speed is worse than on Linux.

Best regards,
Milen





More information about the Ipopt mailing list