<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hello ipopt'ers,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">We are trying to build Ipopt 3.12.6 in windows win32 and win64, using MinGW(we are using tdm-gcc with gcc/gfortran 5.1).</div><div class="gmail_quote"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">We were successful building win32 version both Debug and Release versions, but not so lucky with the win64 version.</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">The versions of the additional software we use:</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">- MUMPS 4.10.0</div><div style="font-family:arial,helvetica,sans-serif">- blas (coinor 20130815)</div><div style="font-family:arial,helvetica,sans-serif">- Lapack 3.4.2</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">To build Ipopt, we proceed as follows:</div><div style="font-family:arial,helvetica,sans-serif"><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><font face="monospace, monospace"># Load cywin and VS2012<br></font><font face="monospace, monospace">export CC=cl<br></font><font face="monospace, monospace">export CXX=cl<br></font><font face="monospace, monospace">./configure --disable-shared --enable-static --with-pic --enable-doscompile=msvc --enable-dependency-linking lt_cv_deplibs_check_method=pas<wbr>s_all --with-blas-lib="$BLAS_HOME/bl<wbr>as.dll" --with-lapack-lib="$LAPACK_HOM<wbr>E/liblapack.dll" --with-mumps-lib="$MUMPS_HOME/<wbr>libdmumps.lib $MUMPS_HOME/<a href="http://libmumps_common.li">libmumps_common.li</a><wbr>b $MUMPS_HOME/libpord.lib $MUMPS_HOME/libmpiseq.lib"<br></font><font face="monospace, monospace">make -j12 install</font></blockquote><div><div style="font-family:arial,sans-serif;font-size:12.8px"><br></div><div style="font-family:arial,sans-serif;font-size:12.8px">Ipopt builds fine win32/win64. And we have a example code to use Ipopt. To build and link the example, we use the following 32bits libraries:</div><div style="font-family:arial,sans-serif;font-size:12.8px"><br></div><div style="font-family:arial,sans-serif;font-size:12.8px">- <span style="font-size:12.8px">$MINGW_ROOT/lib/libmingwex.a</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px">- </span><span style="font-size:12.8px">$MINGW_ROOT/lib/gcc/mingw32/<wbr>5.</span><span style="font-size:12.8px">1.0/libgfortran.dll.a</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px">- $MINGW_ROOT/lib/gcc/mingw32/5.</span><span style="font-size:12.8px"><wbr>1.0/libgcc.a</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px"><br></span></div><div style="font-family:arial,sans-serif;font-size:12.8px">Builds, links and runs nicely on win32. However in win64 we use:</div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px"><br></span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px">- $MINGW_ROOT/x86_64-w64-</span><span style="font-size:12.8px">mingw32<wbr>/lib/libmingwex.a</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px">- </span><span style="font-size:12.8px">$MINGW_ROOT/lib/gcc/x86_64-</span><span style="font-size:12.8px">w<wbr>64-mingw32/5.1.0/libgfortran.</span><span style="font-size:12.8px">d<wbr>ll.a</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px">- $MINGW_ROOT/lib/gcc/x86_64-</span><span style="font-size:12.8px">w64<wbr>-mingw32/5.1.0/libgcc.a</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><br></div><div style="font-family:arial,sans-serif;font-size:12.8px">Here is where the fun starts. We start to get errors like:</div><div style="font-family:arial,sans-serif;font-size:12.8px"><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span style="font-size:12.8px">libmingwex.lib(lib64_</span><span style="font-size:12.8px">libmingwe<wbr>x_a-powi.o) : error LNK2001: unresolved external symbol __mingw_raise_matherr</span></blockquote><div style="font-family:arial,sans-serif;font-size:12.8px"><br></div><div style="font-family:arial,sans-serif;font-size:12.8px">Looking around in mingw we managed to find the missing symbol, at:</div><div style="font-family:arial,sans-serif;font-size:12.8px"><br></div><div style="font-family:arial,sans-serif;font-size:12.8px">- <span style="font-size:12.8px">$MINGW_ROOT\x86_64-w64-</span><span style="font-size:12.8px">mingw<wbr>32\lib\libmingw32.a</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px"><br></span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px">The error then becomes</span></div><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px"><br></span></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><font face="monospace, monospace"><span style="font-size:12.8px">MSVCRT.lib(gs_report.obj) : error LNK2005: </span><b style="font-size:12.8px">__report_gsfailure already defined</b><span style="font-size:12.8px"> in libmingw32.lib(lib64_</span><span style="font-size:12.8px">libmingw3<wbr>2_a-gs_support.o)<br></span><span style="font-size:12.8px">libmingw32.lib(lib64_</span><span style="font-size:12.8px">libmingw3<wbr>2_a-merr.o) : error LNK2005:</span><b style="font-size:12.8px"> _matherr already defined</b><span style="font-size:12.8px"> in MSVCRT.lib(merr.obj)</span></font></blockquote><div style="font-family:arial,sans-serif;font-size:12.8px"><span style="font-size:12.8px"><br></span></div></div><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div style="font-family:arial,helvetica,sans-serif">​Does anybody know ​what are we missing? Or how to solve it?</div><div style="font-family:arial,helvetica,sans-serif">Does anybody know if it's possible to build ipopt with mingw using gfortran? Is it documented in detail?</div></div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">Thanks for your help, and patience to read this far.</div><div><br></div><div><b><i><font color="#000066">Federico Prades Illanes</font></i></b> - <i>ext. (2)75682 - <b>Software Evangelist</b></i></div><div><div><b><font color="#3333ff">Quantitative and Business Solutions (QBS) </font></b><b><font color="#3333ff">- CIB - </font></b><b><font color="#3333ff">BBVA</font></b></div></div></div></div></div>
</div>
</div><br></div>

<br>
<p style="background:white"><span style="font-size:7.0pt;font-family:"Arial","sans-serif";color:#758087">"Este mensaje está
dirigido de manera exclusiva a su destinatario y puede contener información
privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no
deban conocer su contenido. En caso de haberlo recibido por error,  rogamos
lo notifique al remitente y proceda a su borrado, así como al de cualquier
documento que pudiera adjuntarse.</span></p>

<p style="background:white"><span style="font-size:7.0pt;font-family:"Arial","sans-serif";color:#758087"> </span><span style="color:rgb(117,128,135);font-family:Arial,sans-serif;font-size:7pt">Por favor tenga en cuenta que
los correos enviados vía Internet no permiten garantizar la confidencialidad de
los mensajes ni su transmisión de forma íntegra.</span></p>

<p style="background:white"><span style="font-size:7.0pt;font-family:"Arial","sans-serif";color:#758087"> </span><span style="color:rgb(117,128,135);font-family:Arial,sans-serif;font-size:7pt">Las opiniones expresadas en el
presente correo pertenecen únicamente al remitente y no representan
necesariamente la opinión del Grupo BBVA."</span></p>

<p style="background:white"><span style="font-size:7.0pt;font-family:"Arial","sans-serif";color:#758087"> </span><span style="color:rgb(117,128,135);font-family:Arial,sans-serif;font-size:7pt">"This
message is intended exclusively for the adressee and may contain privileged and
confidential information. Please, do not disseminate, copy or distribute it to
third parties who should not receive it. In case you have received it by
mistake, please inform the sender and delete the message and attachments from
your system.</span></p>

<p style="background:white"><span lang="EN-GB" style="font-size:7.0pt;font-family:"Arial","sans-serif";color:#758087"> </span><span style="color:rgb(117,128,135);font-family:Arial,sans-serif;font-size:7pt">Please
keep in mind that e-mails sent by Internet do not allow to guarantee neither
the confidentiality or the integrity of the messages sent."</span></p>