[Ipopt] Building Ipopt Matlab Interface (Win, 64 bit)

Tony Kelman kelman at berkeley.edu
Thu Mar 7 22:57:29 EST 2013


I (re-?)discovered the reason the two distributions of MSYS are giving 
different results. There's a line in libtool that uses find, which is not 
present in MSYS-20111123.zip. This ends up trying to use the Windows version 
of find.exe, which does something entirely different than Unix find. Buried 
in the output from make are probably a few error messages "FIND: Parameter 
format not correct" which results in the call that creates libipopt.a ("ar 
cru .libs/libipopt.a ...") not including nearly enough of the .o files that 
it should be putting in the library. So I'm seeing libipopt.a is about 10x 
smaller in size than it should be, and lots of undefined reference errors.

There is a note about this on the current issues page 
https://projects.coin-or.org/BuildTools/wiki/current-issues#MinGWPath - it's 
rather subtle in this case since things seem to nearly work until you try 

To all current & future Windows Ipopt users, I recommend the MSYS 
installation from 
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ rather 
than anywhere else. You can hopefully use MinGW-64 from anywhere, just 
modify the file /etc/fstab in MSYS to switch to the MinGW-64 compilers. I 
have had the most luck with the TDM-GCC distribution Dino is using (not many 
others support OpenMP from Fortran 90 code), but the MSYS shell is a 
separate download from the MinGW-64 compilers.


-----Original Message----- 
From: Tony Kelman
Sent: Thursday, March 07, 2013 4:16 PM
To: Dino Hüllmann
Subject: Re: [Ipopt] Building Ipopt Matlab Interface (Win, 64 bit)

I seem to remember having had problems with that version of Msys, and I just
confirmed my suspicion. I tried to replicate your Msys installation and
wasn't able to do "make test" in Ipopt, any linking of Windows executables
or shared libraries (dll or mex) fails. Can you do "make test" in the main
build directory successfully, or do you get undefined reference errors when
trying to create hs071_cpp.exe?

So this appears not to be a Matlab interface problem, but an issue with
linking in your Msys setup. Try installing Msys using the mingw-get-inst
installer from
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ and
modify the file /etc/fstab to point to your TDM-GCC MinGW64 installation. I
have instructions written up here:


-----Original Message----- 
From: Dino Hüllmann
Sent: Thursday, March 07, 2013 3:24 PM
To: Tony Kelman
Subject: Re: [Ipopt] Building Ipopt Matlab Interface (Win, 64 bit)

Since compiling using g++ did not work I tried the
x86_64-w64-mingw32-g++, but that yields the same result.
Replacing "set COMPILER=g++" has no effect.

To set up MinGW I used the TDM-GCC 64 installer (tdm64-gcc-4.7.1-3.exe),
added the Fortran compiler and installed it to C:\MinGW64.

For msys I downloaded MSYS-20111123.zip from the MinGW-w64 project
and unpacked it to C:\MinGW64\msys (at a different location gnumex was
not able to create the mexopts.bat since it did not find the required

Finally, I ran msys' postinstall script (/postinstall/pi.sh).

Afterwards the usual steps: cloning trunk to
C:\MinGW64\msys\home\username\trunk, get.Blas, get.Lapack, get.Mumps,
get.Metis, get.gnumex, configure, make

Best regards

More information about the Ipopt mailing list