[Ipopt] Access violation using Ipopt Win32 DLL
Marcel Roelofs
Marcel.Roelofs at aimms.com
Thu Dec 23 05:47:40 EST 2010
Hi Spacecookies,
I'm the maintainer of these precompiled DLLs, and, yes, we are
successfully using them ourselves :)
I've just added the hs071_cpp example to the v8-ifort solution in the
trunk, compiled it in all configurations and they all ran fine with the
precompiled DLLs.
However, I'm using VS 2005 to compile the v8-ifort project. When I tried
to compile the hs071_cpp example with VS 2010, I got the same crash that
you experienced. My guess is that Microsoft changed the binary layout of
std::string objects again in VS 2010 (like the fact that they were
already different in release and debug code in VS 2005), and, yes, in
the crashing call, a std::string object is passed via the Ipopt options
interface. Isn't life nice? My guess would be that the C interface will
still work fine in VS 2010, btw.
I'm a bit at a loss now how to proceed further. I've no problem with
providing the precompiled DLLs we're using ourselves back to community
as well, but am now wondering how much more effort I should invest in
setting up something (ie. precompiled VS 2010 DLLs) that we're not
actively using ourselves at the moment.
BTW. The missing header files you mentioned are the result of not
defining HAVE_CONFIG_H as described in the README file of the binary
distribution. With HAVE_CONFIG_H defined it is looking for
config_ipopt.h which is included in the binary dist.
Cheers,
Marcel Roelofs
Paragon Decision Technology (www.aimms.com)
> Hi all,
>
> So I?ve been trying to use the precompiled Ipopt 3.9.1 Win32 DLL
without much success.
> I?ve built a simple test case for it using the hs071_cpp example. I
always get an access
> violation error on line 40 of hs071_main.cpp where
app->Options()->setNumericValue(...) is called.
> The same thing happens in both Debug and Release builds (using the
respective Debug and Release
> versions of the Ipopt DLL).
>
> I?ve uploaded the Visual Studio 2010 project here if anyone wants to
take a look:
> http://www.mediafire.com/file/3dshj63kftzta83/ipopt_msvc_test.zip
>
> There?s not much to it. I just got the precompiled Win32 binaries from
here...
>
http://www.coin-r.org/download/binary/Ipopt/Ipopt-3.9.1-win32-win64-dll.
7z
>
> added the 2 missing header files (configall_system.h and
configall_system_msc.h) from the source...
> http://www.coin-or.org/download/source/Ipopt/Ipopt-3.9.1.zip
>
> added the 3 source files from Ipopt-3.9.1\Ipopt\examples\hs071_cpp to
a blank Visual Studio 2010
> project, and built it (on Windows 7 32-bit). I don?t really see where
I could have gone wrong...
> but I?d sure like to know. Has anyone else successfully used these
DLLs?
>
> Thanks for any help,
> Spacecookies
CONFIDENTIALITY: This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
More information about the Ipopt
mailing list