This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

some errors compiling a free program with gcc-3.2, gcc-3.4.4 and gcc-4.0.0 on i386 freebsd -5.2.


Hi

makefile is as following:
$ cat Make_Demo
#SOLARIS MAKEFILE
#C++ = /usr/local/bin/CC
C++ = /usr/local/newgcc-4/bin/g++-4.0.0
#C++=CC
#C++ = /usr/local/GNU/bin/g++

#C++FLAGS = -Wall -g -D__OLDSTYLE_CPP__
#C++FLAGS = -g -Wall
#C++FLAGS = -O -Wall
#C++FLAGS = -g -sb -DDEBUG
C++FLAGS = -g -O  -DNEW_ATTOBJECT -DSTUDIES -DNOPOLLING -DCOMNET -DDELETION_SPEC
#C++FLAGS = -g -DSTUDIES

PURIFYING =
INCLUDE = .
SOURCE = src/
BINDIR =
OBJDIR = lib/

DEPEND = /usr/local/newgcc-4/bin/g++-4.0.0dep
PGM_SRV = $(BINDIR)demo


SRCS_SRV = demo1.C AttControl.C  \
        AttObject.C Graph.C AdjazenzMatrix.C List.C  \
        Token.C Tools.C Randomizer.C assert.C MappingData.C randomize.C \
        initrandomize.C GMClass.C Matcher.C TimerSO.C TimerU.C MetaGraph.C \
        ComNet.C  NetworkNodes.C Multiindex.C Decision.C Decision1.C \
        Decision2.C BRANCH_class.C  LineDrawing.C Stroke.C



OBJS_SRV = $(SRCS_SRV:.C=.o)
ROBJS_SRV = $(OBJS_SRV:%=$(OBJDIR)%)
RSRCS_SRV = $(SRCS_SRV:%=$(SOURCE)%)


$(PGM_SRV): $(ROBJS_SRV)
        $(PURIFYING) $(C++) -o $(PGM_SRV) $(ROBJS_SRV) \
        -lnsl \
        -lX11 -lm



$(OBJDIR)%.o: $(SOURCE)%.C
        $(C++) -c -I$(INCLUDE) $(C++FLAGS) $< -o $@


include dependencies_demo

depend:
        $(C++) -E -MM -I$(INCLUDE) $(C++FLAGS) $(RSRCS_SRV) > ./dependencies_dem
o


the errors are as following when compiled:

$ gmake -f Make_Demo
/usr/local/newgcc-4/bin/g++-4.0.0 -c -I. -g -O  -DNEW_ATTOBJECT -DSTUDIES -DNOPO
LLING -DCOMNET -DDELETION_SPEC src/Graph.C -o lib/Graph.o
In file included from /usr/local/newgcc-4/lib/gcc/i386-unknown-freebsd5.2.1/4.0.
0/../../../../include/c++/4.0.0/backward/stream.h:31,
                 from ./assert.h:4,
                 from ./AdjazenzMatrix.h:21,
                 from ./Graph.h:20,
                 from src/Graph.C:1:
/usr/local/newgcc-4/lib/gcc/i386-unknown-freebsd5.2.1/4.0.0/../../../../include/
c++/4.0.0/backward/backward_warning.h:32:2: warning: #warning This file includes
 at least one deprecated or antiquated header. Please consider using one of the
32 headers found in section 17.4.1.2 of the C++ standard. Examples include subst
ituting the <X> header for the <X.h> header for C++ includes, or <iostream> inst
ead of the deprecated header <iostream.h>. To disable this warning use -Wno-depr
ecated.
src/Graph.C: In member function 'void Graph::set(int, int, double*, int)':
src/Graph.C:200: error: no match for 'operator=' in 'at = AttributeClass::regist
erLabel(int, double*, int)(label, values, n)'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C: In member function 'void Graph::set(int, int, double*, int, void*)'
:
src/Graph.C:215: error: no match for 'operator=' in 'at = AttributeClass::regist
erLabel(int, double*, int)(label, values, n)'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C: In member function 'void Graph::resetAttributes(int, int, double*,
int)':
src/Graph.C:228: error: no match for 'operator=' in 'at = AttributeClass::regist
erLabel(int, double*, int)(label, values, n)'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C: In member function 'void Graph::resetEdgeAttributes(int, int, doubl
e*, int)':
src/Graph.C:241: error: no match for 'operator=' in 'at = AttributeClass::regist
erLabel(int, double*, int)(label, values, n)'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C:243: error: no match for 'operator=' in 'at2 = AdjazenzMatrix::getEd
geAttributeId(int, int*, int*)((* ie), (& n1), (& n2))'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C: In member function 'void Graph::setEdge(int, int, int, int, double*
, int)':
src/Graph.C:262: error: no match for 'operator=' in 'at = AttributeClass::regist
erLabel(int, double*, int)(label, values, n)'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C: In member function 'int Graph::getEdgesBetween(int, int, int, int&,
 double*&, int&)':
src/Graph.C:560: error: no match for 'operator=' in 'at = AdjazenzMatrix::isNext
EdgeAttId(int*)((& edge))'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C: In member function 'void Graph::generateDistortions(SortedList&, do
uble)':
src/Graph.C:767: error: no match for 'operator=' in 'i_at = AdjazenzMatrix::isNe
xtEdgeAttId(int*)((& edg))'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C:786: error: no match for 'operator=' in 'at = AdjazenzMatrix::isNext
EdgeAttId(int*)((& edg))'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C: In member function 'List* Graph::getMinimalCycles(int)':
src/Graph.C:1004: error: no match for 'operator=' in 'at = AdjazenzMatrix::isNex
tEdgeAttId(int*)((& edg))'
/AttObject.h:25: note: candidates are: AttId AttId::operator=(AttId&)
/AttObject.h:27: note:                 AttId AttId::operator=(int)
src/Graph.C:1023: warning: converting to 'int' from 'double'
gmake: *** [lib/Graph.o] error 1


 the target and host machine is i386-freebsd-5.2.1


why? are those errors related to the version of gcc?
please help
best regard
 				

        wangxiuli
        wangxiuli@blcu.edu.cn
          2005-07-07




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]