[Coin-discuss] Problem with MinGW

marco tacconi marco.tacconi at studenti.unimi.it
Sat May 6 16:05:39 EDT 2006


Hi all,
first of all sorry for my bad english...

I have written an application that uses Cbc.
It run fine under Linux but under Windows XP, compiled using MinGW (not CYGWIN),
run out of memory (it consume all my virtual memory: 1,69 GB).
So I compiled it using Visual C++ Toolkit 2003 and run fine, as under Linux,
and consume a small amount of memory.

Then I have recompiled it using MinGW with the flags "-Wall -ansi -pedantic".
Under Linux with these flags there are no problem, but under Windows there
are some errors:
In file included from D:/COIN/include/CoinPackedVectorBase.hpp:14,
                 from D:/COIN/include/OsiSolverInterface.hpp:10,
                 from ./SetCoveringCG.h:4,
                 from main.cpp:1:
D:/COIN/include/CoinFloatEqual.hpp: In member function `bool CoinAbsFltEq::operator()(double, double) const':
D:/COIN/include/CoinFloatEqual.hpp:57: error: `_isnan' undeclared (first use this function)
D:/COIN/include/CoinFloatEqual.hpp:57: error: (Each undeclared identifier is reported only once for each function it appears in.)
D:/COIN/include/CoinFloatEqual.hpp: In member function `bool CoinRelFltEq::operator()(double, double) const':
D:/COIN/include/CoinFloatEqual.hpp:118: error: `_isnan' undeclared (first use this function)
D:/COIN/include/CoinFloatEqual.hpp:120: error: `_finite' undeclared (first use this function)
make: *** [WindowsNT-O2/main.o] Error 1

The definition of "_isnan" and "_finite" is given in the CoinFinite.hpp header
file.
As workaround I put in the CoinFloatEqual.hpp header file the following lines,
taken from "float.h":
_CRTIMP int __cdecl _finite (double);
_CRTIMP int __cdecl _isnan (double);

In this way errors go away but the application still consume all memory.

I think that should be possible to compile a program that uses COIN under
MinGW using the flag "-ansi"

Suggestions are welcome :-)
Thanks in advance.
Regards.

Marco Tacconi



More information about the Coin-discuss mailing list