[Ipopt] Error during compilation of Ipopt on Windows using Msys
Tony Kelman
kelman at berkeley.edu
Fri Jul 27 13:59:01 EDT 2012
I've seen similar errors, it can depend which version of MinGW you're using.
In my case libgcc_s was getting added during the configure step that checks
the list of libraries used by gfortran (search for "checking for Fortran
libraries of gfortran" under Ipopt/config.log), so I was able to work around
it by doing ADD_FFLAGS=-static-libgcc.
Either way I guess I was mistaken in the other thread (sorry Paul and
Stefan), it may not be possible to link Ipopt statically against
libgfortran. You will probably need to include the dll's for libgfortran and
a few others along with your application - other computers will either not
have the dll's available, or even more confusingly they might have some
unknown incompatible version of them on their path.
Some people have had luck compiling Ipopt under Visual Studio which I
believe can give you a standalone application, but then you have to manually
go through most of the configure process.
-Tony
-----Original Message-----
Date: Fri, 27 Jul 2012 12:30:40 +0200
From: Yann Sala?n <yannsalaun1 at gmail.com>
To: ipopt at list.coin-or.org
Subject: [Ipopt] Error during compilation of Ipopt on Windows using
Msys
Message-ID:
<CAHDVCz5mZoyU0wHJuTf5WJ=j-B6Ka-9_3Ahq+kGui-7BWmepmQ at mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"
Hi,
I'm trying to compile Ipopt (3.10.2) on Windows with the Msys environment.
The configure step works good, but during the make step, I get the
following errors:
.../lib/gcc/mingw32/4.6.1/libgcc.a(unwind-sjLj.o): In function
`Unwind_SjLj_Register`
.../gcc/unwind-sjlj.c:126: multiple definition of `_Unwind_SjLj_Register`
.../lib/gcc/mingw32/4.6.1/libgcc_s.a: first defined here
...
and the make exits with an error.
I can avoid this error if I add the following flag in the configure step:
CXXFLAGS=?-shared-libstdc++?
But then I encounter another problem: I would like to distribute my
application in the form of a single executable file. Consequently I'm using
the -enable-static and -disable-shared flags in the configure step to
compile Ipopt as a static library. When I try to run the executable file on
another Windows machine, I get an error about
_gfortran_transfert_array_write which can't be found in libgfortran-3.dll.
Does anybody have an idea on how I could distribute my application ? I
think the key of the problem is located in the compilation process of
Ipopt, but I don't clearly understand the errors and the workaround I use.
Thanks a lot for your answers
Yann
More information about the Ipopt
mailing list