[Ipopt] Calling IPOPT from a Qt application

Ali Baharev ali.baharev at gmail.com
Mon Aug 2 16:51:09 EDT 2010


Hi,

I would like to ask you for your kind help.

I would like to integrate IPOPT into a Qt application by request.
Further limitations are: only free and open source tools can be used
with "permissive" licence, the application should be built on Windows
platform, a static build is preferable.

As for the linear solver, MUMPS seems to be the only viable option.

I have followed Rodrigo's advice:

https://projects.coin-or.org/Ipopt/wiki/CompilationHints

I first build IPOPT with the MinGW TDM 4.3.2 compiler. All tests are
passed. Then, I make a simple application that uses an
IpoptApplication. With the TDM compiler, everything works fine.

When linking with the MinGW g++ compiler that comes with Qt, my
application crashes on startup.

I have attached further details on the compilers and the parameters
passed to configure, plus the output from gdb.

Apart from this problem, I would appreciate if you could answer the
following questions.

It seems to me that the dependencies of the libraries cannot be linked
statically with gcc. It seems to me that linking is only done when
main() is available. Why?
I guess partly because certain initializations have to be performed
before main() but there is no way to link them before main() without
main() being available. Maybe it is just a wild guess.

Why is it that the statically linked application needs DLL-s, such as
mingwm10.dll or pthreadGCE2.dll, when running? Why can't these be
statically linked?

Depending on the options, i get a lot of warnings like this, see
attached. I also get them if the cross compiler is used under Linux or
with the TDM compiler. If the cross compiler or the TDM compiler is
used, everything is OK despite the warning. What does this scary
warning mean?

Although a static build is preferable, is there a work around to this
problem using shared libraries? That is, the Qt application
distributed with a DLL or a .so containing IPOPT and the fortran
runtime? Or that is just pushing the problem from linking time to
program startup?

I greatly appreciate any help.

Ali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: details.zip
Type: application/zip
Size: 10756 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/ipopt/attachments/20100802/cbe770ef/attachment.zip 


More information about the Ipopt mailing list