[Coin-ipopt] Ipopt static library for native windows compiler (fwd)

Andreas Waechter andreasw at watson.ibm.com
Thu Sep 16 10:40:28 EDT 2004


Hi Andreas,

Thanks again for the good news.

I updated the README.Windows documentation file to include your
corrections and comments below to build Ipopt using Compaq Fortran 6 and
Microsoft Visual C++ 6.0 with the Developer Studio.

Cheers

Andreas

---------- Forwarded message ----------
Date: Thu, 16 Sep 2004 15:56:57 +0200
From: Andreas Joanni <joanni at massivbau.bauwesen.tu-muenchen.de>
To: Andreas Waechter <andreasw at watson.ibm.com>
Subject: Re: [Coin-ipopt] Ipopt static library for native windows compiler

Hi Andreas W.,

thank you for your email. I have good news, finally I managed to compile
a static Ipopt library in a Windows environment. As you perhaps
remember, I used Compaq Fortran 6 and Microsoft Visual C++ 6.0 with the
Developer Studio.

First, I created a static Fortran Library project and included the Ipopt
Fortran and C files you mentioned in README.windows (***I also needed
check_stop.F, it was not listed there***) and the HSL files. The BLAS
and LAPACK files I did not include, because I linked the executable with
the Intel MKL 7.0 library afterwards. I had to adjust some paths to the
include files, other modifications were not necessary.

Then, after some playing around with the settings, I selected "calling
convention" for the C/C++ compiler as "__stdcall" and checked the box
"use FPP" for the Fortran compiler. My programming knowledge is not too
advanced, so don't know if this library now provides a C or Fortran
interface or if there is a difference at all.

That's it. I linked it with Dfo, and it worked just fine.

I hope this is helpful to others. Thanks again,

Andreas J.




Andreas Waechter schrieb:

> Hi Andreas,
>
> (First of all, you were lucky that I happened to see your message among
> those there were about to be deleted, because they were sent from an email
> address that has not subscribed to the mailing list.  In order to avoid
> that subscribers get spam messages, we only allow to post messages after
> subscription.  I saw that you already subscribed, but with a different
> email address...)
>
> In principe, there is no technical reason (I believe) why one couldn't
> build a Developer Studio project with the compilers that you list to
> compile Ipopt.  The difficulty is that you would have to set the macros in
> config.h and config_f.h according to those compilers.  Since I don't have
> access to these compilers, I can't provide the configuration files for
> those compilers.  Maybe someone else reading the list had success with
> it...?
>
> Have you tried to build a developer studio project in your environment?
> The file README.Windows discusses which files you would have to include,
> and which other things you have to consider.  For the configuration
> include files config*.h that you might try first are in
>
> COIN/Ipopt/VisualStudio/include
>
> I suggest that you just give it a try to build the developer studio
> project.  It probably won't work on the first run, but maybe we can get
> this working with joined forces.
>
> With respect to Cygwin, I don't know if one can use libraries generated by
> the GNU compilers together with native compilers, but I doubt it.  I think
> it is possible to build a DLL containing Ipopt (or even Dfo) in Cygwin,
> but then I think you have to be careful with the calling conventions (for
> the functions for evaluating the objective function etc - those are
> provided via function pointers - or EXTERNAL subroutines in Fortran).
>
> As for the MKL library, it should be no problem to use it if you are able
> to work with the Developer Studio, but again I'm not sure if you can mix
> "native" Windows static libraries with Cygwin libraries.  On the other
> hand, if you are using Ipopt within DFO, you are working with small
> problems, so that I don't think you get any performance boost by using the
> MKL library instead of netlib blas and lapack.
>
> This is my humble assessment of the situation.  I know that some other
> Ipopt users have tried to compile Ipopt with older Windows compilers, and
> I think even with some success, but I'm not sure what they did.  Maybe
> someone else reading the message has some ideas...?
>
> Cheers
>
> Andreas
>




More information about the Coin-ipopt mailing list