[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
info + fix for problem compiling nam-1.0a5 using egcs v1.1
Hello,
I was trying to compile the ns-allinone-2.1b3 package and I had the
following problem with compiling nam. I fixed the problem and now nam
compiles and works. I thought that my experience may be of help to
others......hence this email.
First, let me tell you some info. about my setup. I have upgraded the
nam to nam-1.0a5. My compiler is egcs v1.1 (this is important because
everything compiled fine under gcc-2.7.2). I had the exact same problem
on Linux (RedHat 5.1 - kernel 2.0.34) and on Solaris (SunOS 5.5.1).
This is what the compiler said when I did a make in the nam directory:
$ make
rm -f main.o; c++ -o main.o -c -O2 -DTCL_TK -DNDEBUG -DUSE_SHM
-DHAVE_LIBTCLCL1_0B5 -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A2 -DHAVE_OTCL_H
-DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LIBTCL8_0 -DHAVE_TCL_H -I.
-I../TclCL -I../otcl -I../tkbox/include -I../tclbox/include main.cc
In file included from main.cc:46:
paint.h:50: warning: ANSI C++ forbids declaration `PaintStaticGCSize'
with no type
paint.h:51: warning: ANSI C++ forbids declaration `PaintGCIncrement'
with no type
main.cc:221: warning: ANSI C++ forbids declaration `' with no type
main.cc:221: abstract declarator `int' used as declaration
make: *** [main.o] Error 1
in order to fix this, I did the following:
in main.cc line 221: I changed the line from:
extern "C" Blt_Init(Tcl_Interp*);
to:
extern "C" int Blt_Init(Tcl_Interp*);
in paint.h lines 50 and 51: I changed the lines from:
const PaintStaticGCSize = 512;
const PaintGCIncrement = 64;
to:
const int PaintStaticGCSize = 512;
const int PaintGCIncrement = 64;
At this point, nam compiled.......but it still complained in the
following manner ( in several places):
animation.h:54: warning: ANSI C++ forbids declaration `ClassAllID' with
no type
animation.h:55: warning: ANSI C++ forbids declaration `ClassAnimationID'
with no type
animation.h:56: warning: ANSI C++ forbids declaration `ClassPacketID'
with no type
animation.h:57: warning: ANSI C++ forbids declaration `ClassNodeID' with
no type
animation.h:58: warning: ANSI C++ forbids declaration `ClassEdgeID' with
no type
animation.h:59: warning: ANSI C++ forbids declaration `ClassQueueItemID'
with no type
animation.h:60: warning: ANSI C++ forbids declaration `ClassAgentID'
with no type
animation.h:61: warning: ANSI C++ forbids declaration `ClassLanID' with
no type
animation.h:62: warning: ANSI C++ forbids declaration `ClassTagID' with
no type
animation.h:64: warning: ANSI C++ forbids declaration
`AnimationTagIncrement' with no type
Hope this helps!
Julio
--
___ __o
--- _`\<,_
Julio C. Navas -- (_)/ (_)
________________________________________________________________________
DATAMAN Mobile Computing Lab phone: (732) 445 2706
Computer Science Department fax: (732) 445 0537
Rutgers University email: [email protected]
Piscataway, NJ WWW: http://www.cs.rutgers.edu/~navas/
08855 room: CoRE Building Room 335
________________________________________________________________________