[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Could someone please help me



Hi Boon


> Thanks for pointing out that I should use Tcl-1.0b2. I tried to
> install the whole thing but this time I got stuck again. Could someone 
> please tell me what's the problem? Sorry for bothering you all
> again. The make result is as below (some has been omitted):
> 
> gcc -o inet.o -c -I../Tcl-1.0b2  
-I/home/balim/src/ns-2.0b17/../otcl-0.96
-I/home/balim/src/ns-2.0b17/../tk4.2/generic
-I/home/balim/src/ns-2.0b17/../tcl7.6/generic   -I. -DNEED_SUNOS_PROTOS
-DUSE_SHM -DHAVE_LIBTCLDBG -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK4_2
-DHAVE_TK_H -DHAVE_LIBTCL7_6 -DHAVE_TCL_H  -DNO_TK -Dabort=_ABORT -O2
inet.c
> c++ -o random.o -c -I../Tcl-1.0b2  
-I/home/balim/src/ns-2.0b17/../otcl-0.96
-I/home/balim/src/ns-2.0b17/../tk4.2/generic
-I/home/balim/src/ns-2.0b17/../tcl7.6/generic   -I. -DNEED_SUNOS_PROTOS
-DUSE_SHM -DHAVE_LIBTCLDBG -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK4_2
-DHAVE_TK_H -DHAVE_LIBTCL7_6 -DHAVE_TCL_H  -DNO_TK -Dabort=_ABORT -O2
random.cc
> 
> (omitted)
> 
> c++ -o net.o -c -I../Tcl-1.0b2   -I/home/balim/src/ns-2.0b17/../otcl-0.96
-I/home/balim/src/ns-2.0b17/../tk4.2/generic
-I/home/balim/src/ns-2.0b17/../tcl7.6/generic   -I. -DNEED_SUNOS_PROTOS
-DUSE_SHM -DHAVE_LIBTCLDBG -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK4_2
-DHAVE_TK_H -DHAVE_LIBTCL7_6 -DHAVE_TCL_H  -DNO_TK -Dabort=_ABORT -O2
net.cc
> net.cc: In method `int Network::dorecv(unsigned char *, int, unsigned int
&, int)':
> net.cc:246: warning: passing `int *' to argument 6 of `recvfrom(int, void
*, int, int, sockaddr *, int)' lacks a cast
> c++ -o net-ip.o -c -I../Tcl-1.0b2  
-I/home/balim/src/ns-2.0b17/../otcl-0.96
-I/home/balim/src/ns-2.0b17/../tk4.2/generic
-I/home/balim/src/ns-2.0b17/../tcl7.6/generic   -I. -DNEED_SUNOS_PROTOS
-DUSE_SHM -DHAVE_LIBTCLDBG -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK4_2
-DHAVE_TK_H -DHAVE_LIBTCL7_6 -DHAVE_TCL_H  -DNO_TK -Dabort=_ABORT -O2
net-ip.cc
> net-ip.cc: In method `int IPNetwork::command(int, const char *const *)':
> net-ip.cc:134: `IP_MULTICAST_LOOP' undeclared (first use this function)
> net-ip.cc:134: (Each undeclared identifier is reported only once
> net-ip.cc:134: for each function it appears in.)
> net-ip.cc: In method `int IPNetwork::open(int)':
> net-ip.cc:195: warning: implicit declaration of function `int bzero(...)'
> net-ip.cc: In method `void IPNetwork::localname(struct sockaddr_in *)':
> net-ip.cc:284: warning: implicit declaration of function `int
getsockname(...)'
> *** Error code 1
> make: Fatal error: Command failed for target `net-ip.o'
> ----------------
> 
> Thanks!!!
> 
> Boon Aik


Looks like some #defines are not in the common places under IRIX.
You might have the following tries:

1st:
Look in which include-file "IP_MULTICAST_LOOP" is defined by doing a
"cd /usr/include" and then a

	find . -name "*.h*" -print | xargs grep IP_MULTICAST_LOOP

Make sure to include that file into net-ip.cc

2nd:
bzero is usually defined in <strings.h>, but sometimes it's not. Just type
a "man memset" to see which header-file to include. If nothing else helps,
you can always
replace the bzero(addr, len)-command with memset(addr, 0, len), which
should be in <string.h>.

3rd:
Type a "man getsockname" to see where it is defined.


    Good luck,
             Chris.