[MsVisualStudio] COIN-OR with VisualStudio x64

Chris Bielow bielow at pcpool.mi.fu-berlin.de
Wed Apr 22 04:55:00 EDT 2009


Hi,

I'm trying to compile&run that really great ILP solver of yours using
Visual Studio 2008 in 64bit mode.
I'm using CoinMP-1.3.3.tar.gz to start with. The easy part was to create
a VS2008 solution file (conversion is more or less done automatically).
I needed to change some compile settings to fit into my project, i.e. we
are using dynamic crt, so I changed the /MT(d) flags to /MD(d) and
created an x64 build configuration.
I only need the six core libs: Cbc, cgl, clp, osi, osiclp and coinutils.
It compiles with some type conversion errors and created the six .lib files.
My ILP runs fine in debug mode, but when switching to release mode I get
a nasty stack corruption which I have been unable to trace. The culprit
seems to be the "OsiClpSolverInterface" class. When I create an object
with "new" the program crashes when calling "delete" on it as the next
command (I don't do anything in between).
In a simple test program which just uses the coin-or libs and nothing
else, I can instanciate "OsiClpSolverInterface" in release mode and
delete it without a crash. However, in my big project with lots of other
libs it will crash in release mode.
The exact crash happens in the base class
OsiSolverInterface::setInitialData() in the line: delete handler_;
Being a stack corruption though, I'm not sure this is really where the
mess starts.
This just happens on with x64 Visual Studio. Everything seems fine on
Linux x64.


So long story short:
Has someone ever attempted to use any of the above libs for VS2008 x64?!
Is a problem like this known?!

Would someone be willing to help tackle the issue?! I'd be happy to
provide detailed information on how to reproduce the bug. Probalby
though the proper way is to have a closer look at all the compile
warnings. I think some of them might be the key to the solution, but to
fix them all would take me days or weeks. Most of the warnings stem from 
the fact that M$ decided to
have size_t!=unsigned int on x64 platforms.

*help*

Best,
Chris

-- 
Freie Universität Berlin
Institut für Informatik               phone: +49 30 838 75137
AG Algorithmische Bioinformatik       room 020
Takustr. 9
D-14195 Berlin



More information about the MSVisualStudio mailing list