[Coin-lpsolver] some changes to compile Coin lp solver on Visual C++
Michael.DeFeyter at aisystems.be
Michael.DeFeyter at aisystems.be
Tue Nov 26 05:01:04 EST 2002
Hi,
I've managed to compile coin lp solver on visual c++ 6.0, here's what I
needed to change:
PresolveDoubleton.cpp:
- line 18-28: added "#ifndef _MSC_VER"
#ifndef _MSC_VER
inline double max(double x, double y)
{
return (x < y) ? y : x;
}
inline double min(double x, double y)
{
return (x < y) ? x : y;
}
#endif
PresolveImpliedFree.cpp:
-line 437: changed "delete [] save_costs" to "deleteAction(save_costs)"
PresolveSubst.cpp:
-line 36-40: added "#ifndef _MSC_VER"
#ifndef _MSC_VER
inline int min(int x, int y)
{
return (x < y) ? x : y;
}
#endif
- in function "subst_constraint_action::presolve", line 444:
This is one of the big differences bewteen vc++ and other compilers,
if a variable is declared in like this: "for (int i =0; i < n; i++)", "i"
is still known outside the for loop in vc++. In order for the code to
compile on vc++ and allso on the other compilers, I had to declare k & kk
at the top of the function and remove all other declarations of k & kk.
- line 1351: changed "delete[]actions[i].costsx" to
"deleteAction(actions[i].costsx)"
PresolveZeros.cpp:
line 11-16: added "#ifndef _MSC_VER"
#ifndef _MSC_VER
inline double min(double x, double y)
{
return (x < y) ? x : y;
}
#endif
PresolveZeros.hpp:
line 31: changed "delete[]zeros_" to "deleteAction(zeros_)"
That's about it I guess.
Michael De Feyter
More information about the Clp
mailing list