[Ipopt] Linking problems in MinGW
Antonello Lobianco
antonello at lobianco.org
Sun Jun 10 15:03:50 EDT 2012
Thank you, linking the fortran libreries worked.
For those that have troubles in compiling ipopt under windows with g++
actually it is pretty simple. This is how I done it:
*** MinGW ***
Download the MinGW environment installer (
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-201XXXXX.exe
)
Launch the installer
Select "Download latest repository catalogue"
Select C:\MinGW as folder. Do not change this setting !!
Select the following components:
- C compiler
- C++ Compiler
- Fortran Compiler
- MinGW Developer Toolkit
Open a MinGW shell: START->All programs-> MinGW-> MinGW shell
Type "mingw-get install msys-wget" (you'll need this in order to get ipopt
third party libraries)
Note: From the MinGW shell you'll find the hard disk content under "/c"
*** Ipopt ***
Downolad ipopt Ipopt-3.XX.X.tgz from
http://www.coin-or.org/download/source/Ipopt/ and extract it to somewhere
where there is no spaces in the path (e.g. in Win7 the standard "Download"
folder is fine, in WinXP it isn't.). In the remaining of this tutorial
we'll assume that the ipopt folder is C:\ipopt.
In the ipopt extracted folder create a "build" folder, so that you end up
having C:\ipopt\build.
Open the MinGW shell and type "cd /c/ipopt/ThirdParty".
For each of {Blas|Lapack|Metis|Mumps} go in their subfolder and run from
there "./get.{Blas|Lapack|Metis|Mumps}". This will download and extract
them to a place that the ipopt configure will find them.
Type "cd /c/ipopt/build" and then from there run, in the sequence:
../configure
make
make install
Kind regards to everyone,
Antonello
2012/6/8 Stefan Vigerske <stefan at math.hu-berlin.de>
> Hi,
>
> sounds like you are missing the gfortran libraries on your linkline, e.g.,
> -lgfortran.
> Ipopts build includes a file share/coin/doc/Ipopt/ipopt_**addlibs_cpp.txt
> which lists all the flags necessary for linking with Ipopt. That may be
> handy...
>
> Stefan
>
> Hello all.
>> I am new to ipopt and to the list .. and I hope you'll get this email, as
>> I
>> didn't received any confirmation email from mailman..
>> Any how, I am trying to build a qmake based program and the code runs well
>> in Linux, but I need it also in windows.
>> When I try to link it with the ipopt libraries I previously compiled I got
>> some 5,000 errors on missing functions in fortran code (e.g.
>> dmumps_part3.F:-1: error: undefined reference to `_gfortran_st_write').
>>
>> my qmake looks like:
>>
>> win32 {
>>
>> INCLUDEPATH += win32/include/coin
>>
>> INCLUDEPATH += win32/include/coin/ThirdParty
>>
>> LIBS += -L win32/lib -lipopt
>>
>> LIBS += -L win32/lib -lcoinmetis
>>
>> LIBS += -L win32/lib -lcoinmumps
>>
>> LIBS += -L win32/lib -lcoinblas
>>
>> LIBS += -L win32/lib -lcoinlapack
>>
>> }
>>
>>
>> (where "win32" is a subfolder of my project where I copied the includes
>> and
>> the libraries from the MinGW compiled one)
>>
>> I compiled the ipopt with MinGW directly from source following section 2.3
>> of the tutorial ("Compiling and installing IPOPT"), and I am able to run
>> the examples.
>>
>> Any cue?
>>
>>
>>
>>
>> ______________________________**_________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/**mailman/listinfo/ipopt<http://list.coin-or.org/mailman/listinfo/ipopt>
>>
>
>
--
Antonello Lobianco
INRA, Laboratoire d'Economie Forestière
14 Rue Girardet - 54000 Nancy, France
Tel: +33.652392310
Email: antonello.lobianco at nancy-engref.inra.fr
http://antonello.lobianco.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120610/18f6b480/attachment.html>
More information about the Ipopt
mailing list