[Coin-discuss] Problems compiling Coin utilities with gcc 2.95 and 2.96

John J Forrest jjforre at us.ibm.com
Mon Nov 1 15:07:00 EST 2004


swap renamed as CoinSwap and moved to coinHelperFunctions.hpp.

Will be in cvs as soon as I run tests.

John Forrest



Ted Ralphs <tkralphs at lehigh.edu> 
Sent by: coin-discuss-admin at www-124.southbury.usf.ibm.com
11/01/2004 02:28 PM
Please respond to
coin-discuss


To
coin-discuss at www-124.southbury.usf.ibm.com
cc

Subject
[Coin-discuss] Problems compiling Coin utilities with gcc 2.95 and 2.96






I just discovered that the Coin utility library does not compile with 
gcc versions 2.95 or 2.96 (Redhat).  I installed version 3.4.2 (the 
latest release) and it does compile with that one. I'm not sure about 
versions in between. The problem is a name conflict with the declaration 
of the STL algorithm "swap." CoinPresolveMatrix.hpp also declares a swap 
method. I'm not sure exactly why it compiles in later version of  gcc, 
since this still appears  to be a conflict. The error message is 
appended below.

I don't know exactly what versions of gcc we intend to support, but in 
any case, we should probably avoid conflicts with names that are used in 
the STL. It probably makes sense to change the name of the swap method 
in  CoinPostsolveMatrix.hpp to something else.

Cheers,

Ted

==================================================================

In file included from CoinPostsolveMatrix.cpp:10:
include/CoinPresolveMatrix.hpp:1642: redefinition of `template <class T> 
void swap(T &, T &)'
/usr/local/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3/stl_algobase.h:76: 

`template <class _Tp> void swap(_Tp &, _Tp &)' previously declared here
include/CoinPresolveMatrix.hpp:1642: redefinition of `void swap(T &, T &)'
/usr/local/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3/stl_algobase.h:76: 

`void swap(_Tp &, _Tp &)' previously defined here
make[1]: *** [Linux-g/CoinPostsolveMatrix.o] Error 1
make[1]: Leaving directory `/home2/tkr/COIN/Coin'
make: *** [install] Error 2

-- 
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2

"An optimist is someone who thinks 
'It doesn't get any better than this.'
A pessimist is someone who's afraid that's true."


_______________________________________________
Coin-discuss mailing list
Coin-discuss at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20041101/d18a15cf/attachment.html>


More information about the Coin-discuss mailing list