Hi Rodrigo, Jens,<div><br></div><div>thanks for all your help. I finally got it to work. </div><div><br></div><div>I am on windows 7, but that doesn&#39;t really seem to change anything. The mex file I compiled on 7 works on XP just as well. Here&#39;s what I did:</div>
<div><br></div><div>- got the current mingw + msys using the automated installer, installing everything but the objective c and ada compilers.</div><div>- followed the steps on the website, configure using the same options as Rodrigo</div>
<div><br></div><div>configure, make, make test, make install all worked flawlessly. The problems started with gnumex.</div><div><br></div><div>1. I am using Matlab 7.11, so I had to use the new gnumex 2.03 which fixes a bug in Matlab 7.11&#39;s <a href="http://mex.pl">mex.pl</a> file</div>
<div>2. I changed the mexopts.bat file according to Rodrigo&#39;s suggestions. The problem I ran into was that all the .a libraries were not found, because the compiler only looked for .lib files. I got  around this problem by creating symbolic links of the form *.lib to all the necessary *.a files</div>
<div><br></div><div>With these changes, it compiled without problems</div><div><br></div><div>Since &quot;ipopt matlab windows&quot; seems to be a very popular google search term, I was wondering if there exist any copyright/legal objections against posting the compiled ipopt mex file (with MUMPS) and all the necessary files to run it somewhere online? </div>
<div><br></div><div>Hans</div><div><br><div class="gmail_quote">On Mon, Nov 29, 2010 at 2:40 AM, Rodrigo Lopez-Negrete <span dir="ltr">&lt;<a href="mailto:r.lopez.negrete@gmail.com">r.lopez.negrete@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Hans and Jens,<div><br></div><div>I just tried compiling the matlab interface again. I was able to do it following *some* of my instructions on the Ipopt website. Here&#39;s what I did.</div>
<div><br></div><div>I used a clean install of MinGW/Msys with the newest available installer from the MinGW website (mingw-get-inst-20101030.exe). I&#39;m using Windows XP and the compilers that come with the MinGW download:</div>


<div><br></div><div><div>$ gcc -v</div><div>Using built-in specs.</div><div>COLLECT_GCC=C:\MinGW\bin\gcc.exe</div><div>COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe</div><div>Target: mingw32</div>


<div>Configured with: ../gcc-4.5.0/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror --build=mingw32 --prefix=/mingw</div>


<div>Thread model: win32</div><div>gcc version 4.5.0 (GCC)</div></div><div><br></div><div><br></div><div>I configured Ipopt using</div><div><br></div><div>$ ../configure -C --enable-doscompile --enable-static --disable-shared ADD_CXXFLAGS=&quot;-fexceptions&quot; ADD_CFLAGS=&quot;-fexceptions&quot; ADD_FFLAGS=&quot;-fexceptions&quot;</div>


<div><br></div><div>Make the ipopt library. All tests passed for me.</div><div><br></div><div>Then I generated the mexopts.bat file using gnumex. This file I copied to the $IPOPT/build/Ipopt/contrib/MatlabInterface/src folder, and I modified it as follows:</div>


<div><br></div><div>set GM_MEXLANG=cxx</div><div>set GM_ADD_LIBS= -llibmx -llibmex -llibmat -Lc:/MinGW/msys/uno/home/testnew/Ipopt/build/lib/coin -Lc:/MinGW/msys/uno/home/testnew/Ipopt/build/lib/coin/ThirdParty -lipopt -lcoinhsl -lcoinmetis -lcoinmumps -lcoinlapack -lcoinblas  -Lc:/MinGW/lib -LC:/MinGW/lib  -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../.. -L/mingw/lib -lgfortran -lmingw32 -lgcc_s -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lpthread -lm</div>


<div>set COMPILER=g++ </div><div><br></div><div>The makefile I setup like this (as per my Matlab installation)</div><div><ol style="list-style-type:lower-alpha;font-family:Verdana, Arial, &#39;Bitstream Vera Sans&#39;, Helvetica, sans-serif;font-size:13px">


<li>MATLAB_HOME = /c/PROGRA~1/MATLAB/R2009a/</li><li>MEXSUFFIX = mexw32</li><li>MEX = $(MATLAB_HOME)/sys/perl/win32/bin/perl.exe $(MATLAB_HOME)/bin/<a href="http://mex.pl" target="_blank">mex.pl</a></li><li>remove the -cxx flag from MEXFLAGS</li>


</ol><div>When doing make for the Matlab interface it complains about not finding the &#39;m&#39; library, however it compiles and generates the ipopt.mexw32 file. I tested it with the examples, and it worked.</div><div>

<br>
</div><div>I hope this helps. If you try this and it works, let me know. I may update the Ipopt website.</div><div><br></div><div>Best, </div><div>  Rodrigo</div><div><div></div><div class="h5"><br><div class="gmail_quote">
On Thu, Nov 25, 2010 at 4:01 AM, Jens Schubert <span dir="ltr">&lt;<a href="mailto:jens.schubert.1@googlemail.com" target="_blank">jens.schubert.1@googlemail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hans,<br>
<div><br>
&gt; I used tdm-gcc-4.3.2 as described in the compulation hints.<br>
</div>I just checked the mingw home page. I found that the documentation was<br>
updated since I had read it last time. However, go to<br>
<a href="http://www.mingw.org/wiki/InstallationHOWTOforMinGW" target="_blank">http://www.mingw.org/wiki/InstallationHOWTOforMinGW</a><br>
and scroll down to &#39;Manual Installations&#39;. Follow all the instructions<br>
- this will need some time. I checked a few links, for me it looks<br>
like they point all to the gcc4.5 version. So here you will get all<br>
the necessary packages.<br>
<br>
Then, after you updated to the newest version of gcc, try to use it.<br>
In my gcc-version (4.5.0-1) the compiler did not yet work fully<br>
correctly, that is why one had to set the linker-option ( I found this<br>
in the release notes). [I just see that this version is the same as<br>
the version suggested on the mingw page.]<br>
<div><br>
&gt;<br>
&gt;&gt; For me it works with gcc4.5.0 and using the linkeroption<br>
&gt;&gt; &#39;--enable-runtime-pseudo-reloc-v2&#39; durch &#39;--enable-auto-import&#39;.<br>
&gt;<br>
&gt; I&#39;m not sure what exactly you mean - can you clarify where I need to<br>
&gt; specify which of these options?<br>
</div>Well, this depends on your environment. I work in the &#39;msys&#39;-shell as<br>
suggested on the mingw home page. If gcc is called,<br>
(a) either directly by typing on the msys command-prompt,<br>
(b) or by a make-tool<br>
(c) or by some other program<br>
there is always a way to set the compiler options. In my case (b) I<br>
just put it as an option behind the gcc-comand in the makefile.<br>
<div><br>
&gt; Can you tell me why you chose these<br>
&gt; options?<br>
</div>See above: I found it in the release notes.<br>
The (nearly) complete list of all options may be found in the gcc manual.<br>
<a href="http://gcc.gnu.org/onlinedocs/" target="_blank">http://gcc.gnu.org/onlinedocs/</a><br>
But the list is too long for just reading it, you need to use the list<br>
as reference for looking up unknown things.<br>
<br>
<br>
Good luck<br>
<font color="#888888">Jens Schubert<br>
</font><div><div></div><div><br>
&gt;<br>
&gt; Thanks for your help!<br>
&gt;<br>
&gt; Hans<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hope it helps<br>
&gt;&gt; Jens<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2010/11/24 Hans Pirnay &lt;<a href="mailto:hans.pirnay@rwth-aachen.de" target="_blank">hans.pirnay@rwth-aachen.de</a>&gt;:<br>
&gt;&gt;&gt; Hi everyone,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I am trying to compile Ipopt for Windows so I might finally be able to<br>
&gt;&gt;&gt; use it for Matlab, but I ran into problems using Rodrigo&#39;s guide on<br>
&gt;&gt;&gt; <a href="https://projects.coin-or.org/Ipopt/wiki/CompilationHints" target="_blank">https://projects.coin-or.org/Ipopt/wiki/CompilationHints</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I set up a MinGW system, and successfully ran configure and make with<br>
&gt;&gt;&gt; the same options Rodrigo used. However, any executables I create (all<br>
&gt;&gt;&gt; examples, as well as running make test) compile fine, but fail at<br>
&gt;&gt;&gt; runtime with the usual<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &quot;hs071_cpp.exe has encountered a problem and needs to close. --- Send<br>
&gt;&gt;&gt; Error Report / Don&#39;t Send&quot; - window.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I tried to compile a simple helloworld program just to check if any<br>
&gt;&gt;&gt; code compiled on MinGW fails, but that worked fine.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Has anyone encountered and overcome this problem before? Any help is<br>
&gt;&gt;&gt; appreciated!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; thanks<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hans<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Ipopt mailing list<br>
&gt;&gt;&gt; <a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
&gt;&gt;&gt; <a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br><span style="font-family:Arial, Helvetica, sans-serif;font-size:14.1667px;border-collapse:collapse;color:rgb(51, 51, 51)"><img width="200" height="24"><br>


<strong><span><font color="#000000"><span style="background-color:rgb(255, 255, 255)">Rodrigo</span></font></span><font color="#000000"><span style="background-color:rgb(255, 255, 255)"> López-</span></font><span><font color="#000000"><span style="background-color:rgb(255, 255, 255)">Negrete</span></font></span><font color="#000000"><span style="background-color:rgb(255, 255, 255)"> de la Fuente</span></font></strong><font color="#000000"><span style="background-color:rgb(255, 255, 255)"><br>


</span></font>Doctoral Candidate <br>Email: <a href="mailto:rln@cmu.edu" style="color:rgb(7, 77, 143)" target="_blank"><span>rln@cmu.edu</span></a><div><span style="color:rgb(34, 34, 34)"><span style="background-color:rgb(255, 255, 255)">WWW</span></span><span style="background-color:rgb(255, 255, 255)">: <a href="http://rodrigo.lopez-negrete.org" target="_blank">http://rodrigo.lopez-negrete.org</a></span><span style="background-color:rgb(255, 255, 255)"><br>


</span><br>Department of Chemical Engineering<br>Carnegie Mellon University <br>5000 Forbes Ave. <br>Pittsburgh, PA 15213-3890<br>USA</div></span><br>
</div>
</blockquote></div><br></div>