Cbc
Cbc copied to clipboard
compilation error with gcc on linux
g++ -DHAVE_CONFIG_H -I. -I. -I../src -I/usr/include/coin -I/usr/include/coin -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DCBC_BUILD -MT CbcCutGenerator.lo -MD -MP -MF .deps/CbcCutGenerator.Tpo -c CbcCutGenerator.cpp -fPIC -DPIC -o .libs/CbcCutGenerator.o
In file included from /usr/include/coin/OsiCuts.hpp:14:0,
from CbcModel.hpp:13,
from CbcCutGenerator.cpp:25:
/usr/include/coin/OsiColCut.hpp: In member function 'virtual bool OsiColCut::infeasible(const OsiSolverInterface&) const':
/usr/include/coin/OsiColCut.hpp:304:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if ( cutUbs.isExistingIndex(colIndx) )
^~
/usr/include/coin/OsiColCut.hpp:306:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if ( newLb > newUb )
^~
/usr/include/coin/OsiColCut.hpp:315:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if ( cutLbs.isExistingIndex(colIndx) )
^~
/usr/include/coin/OsiColCut.hpp:317:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if ( newUb < newLb )
^~
CbcCutGenerator.cpp: In member function 'bool CbcCutGenerator::generateCuts(OsiCuts&, int, OsiSolverInterface*, CbcNode*)':
CbcCutGenerator.cpp:306:12: error: 'class CglTreeInfo' has no member named 'parentSolver'
info.parentSolver = model_->parentModel()->continuousSolver();
^~~~~~~~~~~~
CbcCutGenerator.cpp:308:12: error: 'class CglTreeInfo' has no member named 'hasParent'
info.hasParent = ((model_->specialOptions() & 67108864) == 0) ? 1 : 2;
^~~~~~~~~
CbcCutGenerator.cpp:310:12: error: 'class CglTreeInfo' has no member named 'hasParent'
info.hasParent = 0;
^~~~~~~~~
CbcCutGenerator.cpp:311:12: error: 'class CglTreeInfo' has no member named 'parentSolver'
info.parentSolver = NULL;
^~~~~~~~~~~~
CbcCutGenerator.cpp:313:10: error: 'class CglTreeInfo' has no member named 'originalColumns'
info.originalColumns = model_->originalColumns();
^~~~~~~~~~~~~~~
CbcCutGenerator.cpp:351:18: error: 'class CglTreeProbingInfo' has no member named 'parentSolver'
info2->parentSolver = model_->parentModel()->continuousSolver();
^~~~~~~~~~~~
CbcCutGenerator.cpp:353:18: error: 'class CglTreeProbingInfo' has no member named 'hasParent'
info2->hasParent = ((model_->specialOptions() & 67108864) == 0) ? 1 : 2;
^~~~~~~~~
CbcCutGenerator.cpp:355:18: error: 'class CglTreeProbingInfo' has no member named 'hasParent'
info2->hasParent = 0;
^~~~~~~~~
CbcCutGenerator.cpp:356:18: error: 'class CglTreeProbingInfo' has no member named 'parentSolver'
info2->parentSolver = NULL;
^~~~~~~~~~~~
CbcCutGenerator.cpp:358:16: error: 'class CglTreeProbingInfo' has no member named 'originalColumns'; did you mean 'fixColumns'?
info2->originalColumns = model_->originalColumns();
^~~~~~~~~~~~~~~
fixColumns
Makefile:994: recipe for target 'CbcCutGenerator.lo' failed
make[3]: *** [CbcCutGenerator.lo] Error 1
make[3]: Leaving directory '/mnt/quadrupole/sources/math/Cbc-releases-2.10.5/Cbc/src'
Makefile:758: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/mnt/quadrupole/sources/math/Cbc-releases-2.10.5/Cbc/src'
Makefile:607: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/mnt/quadrupole/sources/math/Cbc-releases-2.10.5/Cbc'
Makefile:324: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Looks like you are combining versions that are incompatible. I guess you cloned the Cbc repo only and that you already have some packaged versions of dependencies installed, since the headers are being found in /usr/include/coin. But it's a little hard to tell. If you could say what distro you're using, how you obtained the source, what you did to build it, what COIN-OR packages you may already have installed, etc., ten we can track it down.