[Coin-discuss] Compiling Osi with gcc 2.95.3

Michael Hennebry hennebry at web.cs.ndsu.nodak.edu
Fri Feb 18 14:47:59 EST 2005


On Fri, 18 Feb 2005, Ted Ralphs wrote:

> Osi currently does not compile with gcc 2.95.3 because of the following
> lines added to OciColCut.hpp by Lou in version 1.5:
>
> calvin: ~/COIN/Osi/include> cvs diff -r 1.4 -r 1.5 OsiColCut.hpp
> Index: OsiColCut.hpp
> ===================================================================
> RCS file: /home/coin/coincvs/COIN/Osi/include/OsiColCut.hpp,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -r1.4 -r1.5
> 61a62
>  >   using OsiCut::operator== ;
> 65a67,68
>  >
>  >   using OsiCut::operator!= ;
>
> The same was done to OsiRowCut.hpp. The log for this revision says
> "Added `using' dec'ls for proper overload resolution." Deleting these
> lines allows it to compile.
>
> Anyone know the reason for the change and why 2.95.3 complains about it?
> Is there a solution that will work for earlier and later versions of
> gcc? Here is the error that occurs before deleting the lines:

I suspect the reason is that gcc 2.95.3 doesn't handle usings as well
as gcc 3.0+.

Try something like this:
inline virtual bool operator==(const OsiCut& rhs) const
    { return OsiCut::operator==(rhs); }
>
> Compiling OsiRowCut.cpp
> In file included from OsiRowCut.cpp:13:
> include/OsiRowCut.hpp:157: cannot adjust access to `bool
> OsiCut::operator ==(const OsiCut &) const' in `class OsiRowCut'
> include/OsiRowCut.hpp:75:   because of local method `bool
> OsiRowCut::operator ==(const OsiRowCut &) const' with same name
> include/OsiRowCut.hpp:157: cannot adjust access to `bool
> OsiCut::operator !=(const OsiCut &) const' in `class OsiRowCut'
> include/OsiRowCut.hpp:79:   because of local method `bool
> OsiRowCut::operator !=(const OsiRowCut &) const' with same name
> make[2]: *** [Linux-g/OsiRowCut.o] Error 1
> make[2]: Leaving directory `/home2/tkr/COIN/Osi'
> make[1]: *** [library] Error 2
> make[1]: Leaving directory `/home2/tkr/COIN/Osi'
> make: *** [libOsi] Error 2

-- 
Mike   hennebry at web.cs.ndsu.NoDak.edu
"Our gods are dead.  Ancient Klingon warriors slew them
... they were more trouble than they were worth."          --  Worf




More information about the Coin-discuss mailing list