Hello,<br>I&#39;ve been investigating the use of LP solvers other than CLP with CBC, and I&#39;ve hit a bit of a snag.<br>In CbcConfig, there are 2 lines:<br><br><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">/* Define to 1 if the Clp package is used */<br>
#define COIN_HAS_CLP 1</font><br><br>As I am compiling the &quot;minimum.cpp&quot; example with an LP solver that isn&#39;t CLP (i.e. <font class="Apple-style-span" face="&#39;courier new&#39;, monospace">#include &quot;OsiXYZSolverInterface.hpp&quot;</font>), I figured I should set this to zero<br>
<br><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">#define COIN_HAS_CLP 0</font><br><br>I re-compiled, and I happened to being stepping through when I noticed code that (I think) shouldn&#39;t of been compiled, was compiled!<br>
<br>As an example, right near the start of void CbcModel::branchAndBound():<br><br><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...<br>...<br>#ifdef COIN_HAS_CLP<br> {<br>   OsiClpSolverInterface * clpSolver = dynamic_cast&lt;OsiClpSolverInterface *&gt; (solver_);<br>
   if (clpSolver) {<br>     // pass in disaster handler<br>     CbcDisasterHandler handler(this);<br>...<br>...</font><br><br><br>Because COIN_HAS_CLP is still defined, the code still compiles. I can&#39;t help but feel this is _not_ the intended behaviour...<br>
Should it not be:<br><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">#if COIN_HAS_CLP == 1</font><br>or maybe just<br><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">#if COIN_HAS_CLP</font><br>
?<div><br></div><div>Cheers,</div><div>Iain Dunning</div><div>University of Auckland</div>