gcc2.95下 ns2.1b8a 编译 错误集锦(从多个其他好多 页面整合过来的错误)

来源:互联网 发布:湖南招聘网域名是什么 编辑:程序博客网 时间:2024/05/23 22:15
m -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
errors tclsh tcltest lib.exp
if test -f dltest/Makefile; then cd dltest; make clean; fi
rm -rf Makefile config.status config.cache config.log tclConfig.sh \
SCRPtcl.* prototype
if test -f dltest/Makefile; then cd dltest; make distclean; fi
creating cache ./config.cache
checking for ranlib... ranlib
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for unistd.h... yes
checking for limits.h... yes
checking for building with threads... no (default)
checking if the compiler understands -pipe... yes
checking for getcwd... yes
checking for opendir... yes
checking for strstr... yes
checking for strtol... yes
checking for tmpnam... yes
checking for waitpid... yes
checking for strerror... yes
checking for getwd... yes
checking for wait3... yes
checking for uname... yes
checking for realpath... yes
checking dirent.h... yes
checking for errno.h... no
checking for float.h... yes
checking for values.h... yes
checking for limits.h... (cached) yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/wait.h... no
checking for dlfcn.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... no
checking termios vs. termio vs. sgtty... termios
checking fd_set and sys/select... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for tm_zone in struct tm... yes
checking tm_tzadj in struct tm... no
checking tm_gmtoff in struct tm... yes
checking long timezone variable... yes
checking for st_blksize in struct stat... yes
checking for fstatfs... yes
checking for 8-bit clean memcmp... yes
checking for memmove... yes
checking proper strstr implementation... yes
checking for strtoul... yes
checking for strtod... yes
checking for strtod... (cached) yes
checking for Solaris2.4/Tru64 strtod bugs... ok
checking for ANSI C header files... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for opendir... (cached) yes
checking union wait... no
checking matherr support... yes
checking for strncasecmp... yes
checking for BSDgettimeofday... no
checking for gettimeofday... yes
checking for gettimeofday declaration... present
checking whether char is unsigned... no
checking signed char declarations... yes
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... Linux-3.2.0-23-generic-pae
checking if gcc is being used... yes (gcc -pipe)
checking for dlopen in -ldl... yes
checking for build with symbols... no
checking for sys/ioctl.h... no
checking for sys/filio.h... no
checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... O_NONBLOCK
checking how to build libraries... static
updating cache ./config.cache
creating ./config.status
creating Makefile
creating tclConfig.sh
gcc -pipe -c -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_ERRNO_H=1 -DNO_SYS_WAIT_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DSTATIC_BUILD=1         -DTCL_SHLIB_EXT=\".so\" ./../generic/regcomp.c
In file included from /usr/include/sys/types.h:223,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regcomp.c:33:
/usr/include/sys/sysmacros.h: In function `gnu_dev_major':
/usr/include/sys/sysmacros.h:47: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_minor':
/usr/include/sys/sysmacros.h:53: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_makedev':
/usr/include/sys/sysmacros.h:60: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h:61: warning: negative integer implicitly converted to unsigned type
In file included from /usr/include/sys/types.h:271,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regcomp.c:33:
/usr/include/bits/pthreadtypes.h: At top level:
/usr/include/bits/pthreadtypes.h:100: warning: unnamed struct/union that defines no instances
gcc -pipe -c -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_ERRNO_H=1 -DNO_SYS_WAIT_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DSTATIC_BUILD=1         -DTCL_SHLIB_EXT=\".so\" ./../generic/regexec.c
In file included from /usr/include/sys/types.h:223,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regexec.c:32:
/usr/include/sys/sysmacros.h: In function `gnu_dev_major':
/usr/include/sys/sysmacros.h:47: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_minor':
/usr/include/sys/sysmacros.h:53: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_makedev':
/usr/include/sys/sysmacros.h:60: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h:61: warning: negative integer implicitly converted to unsigned type
In file included from /usr/include/sys/types.h:271,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regexec.c:32:
/usr/include/bits/pthreadtypes.h: At top level:
/usr/include/bits/pthreadtypes.h:100: warning: unnamed struct/union that defines no instances
gcc -pipe -c -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_ERRNO_H=1 -DNO_SYS_WAIT_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DSTATIC_BUILD=1         -DTCL_SHLIB_EXT=\".so\" ./../generic/regfree.c
In file included from /usr/include/sys/types.h:223,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regfree.c:39:
/usr/include/sys/sysmacros.h: In function `gnu_dev_major':
/usr/include/sys/sysmacros.h:47: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_minor':
/usr/include/sys/sysmacros.h:53: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_makedev':
/usr/include/sys/sysmacros.h:60: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h:61: warning: negative integer implicitly converted to unsigned type
In file included from /usr/include/sys/types.h:271,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regfree.c:39:
/usr/include/bits/pthreadtypes.h: At top level:
/usr/include/bits/pthreadtypes.h:100: warning: unnamed struct/union that defines no instances
gcc -pipe -c -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_ERRNO_H=1 -DNO_SYS_WAIT_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DSTATIC_BUILD=1         -DTCL_SHLIB_EXT=\".so\" ./../generic/regerror.c
In file included from /usr/include/sys/types.h:223,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regerror.c:32:
/usr/include/sys/sysmacros.h: In function `gnu_dev_major':
/usr/include/sys/sysmacros.h:47: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_minor':
/usr/include/sys/sysmacros.h:53: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_makedev':
/usr/include/sys/sysmacros.h:60: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h:61: warning: negative integer implicitly converted to unsigned type
In file included from /usr/include/sys/types.h:271,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ../generic/regcustom.h:30,
                 from ../generic/regguts.h:38,
                 from ./../generic/regerror.c:32:
/usr/include/bits/pthreadtypes.h: At top level:
/usr/include/bits/pthreadtypes.h:100: warning: unnamed struct/union that defines no instances
gcc -pipe -c -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_ERRNO_H=1 -DNO_SYS_WAIT_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DSTATIC_BUILD=1         -DTCL_SHLIB_EXT=\".so\" -DUSE_TCLALLOC=0 ./../generic/tclAlloc.c
In file included from /usr/include/bits/errno.h:25,
                 from /usr/include/errno.h:36,
                 from ../generic/../unix/tclUnixPort.h:39,
                 from ../generic/tclPort.h:27,
                 from ./../generic/tclAlloc.c:22:
/usr/include/linux/errno.h:4: asm/errno.h: No such file or directory
In file included from /usr/include/signal.h:339,
                 from ../generic/../unix/tclUnixPort.h:45,
                 from ../generic/tclPort.h:27,
                 from ./../generic/tclAlloc.c:22:
/usr/include/bits/sigcontext.h:28: asm/sigcontext.h: No such file or directory
In file included from /usr/include/sys/socket.h:40,
                 from ../generic/../unix/tclUnixPort.h:103,
                 from ../generic/tclPort.h:27,
                 from ./../generic/tclAlloc.c:22:
/usr/include/bits/socket.h:383: asm/socket.h: No such file or directory
In file included from /usr/include/sys/types.h:223,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ./../generic/tclAlloc.c:21:
/usr/include/sys/sysmacros.h: In function `gnu_dev_major':
/usr/include/sys/sysmacros.h:47: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_minor':
/usr/include/sys/sysmacros.h:53: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h: In function `gnu_dev_makedev':
/usr/include/sys/sysmacros.h:60: warning: negative integer implicitly converted to unsigned type
/usr/include/sys/sysmacros.h:61: warning: negative integer implicitly converted to unsigned type
In file included from /usr/include/sys/types.h:271,
                 from /usr/include/stdlib.h:320,
                 from ../generic/tclInt.h:45,
                 from ./../generic/tclAlloc.c:21:
/usr/include/bits/pthreadtypes.h: At top level:
/usr/include/bits/pthreadtypes.h:100: warning: unnamed struct/union that defines no instances
In file included from ../generic/../unix/tclUnixPort.h:45,
                 from ../generic/tclPort.h:27,
                 from ./../generic/tclAlloc.c:22:
/usr/include/signal.h:342: warning: `struct sigcontext' declared inside parameter list
/usr/include/signal.h:342: warning: its scope is only this definition or declaration, which is probably not what you want.
In file included from /usr/include/sys/socket.h:40,
                 from ../generic/../unix/tclUnixPort.h:103,
                 from ../generic/tclPort.h:27,
                 from ./../generic/tclAlloc.c:22:
/usr/include/bits/socket.h:433: warning: `struct mmsghdr' declared inside parameter list
/usr/include/bits/socket.h:440: warning: `struct mmsghdr' declared inside parameter list
make: *** [tclAlloc.o] Error 1
tcl8.3.2 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a$ find -name configure
./otcl-1.0a7/configure
./tk8.3.2/unix/configure
./tk8.3.2/win/configure
./tcl8.3.2/unix/configure
./tcl8.3.2/unix/dltest/configure
./tcl8.3.2/win/configure
./nam-1.0a10/configure
./ns-2.1b8a/configure
./zlib-1.1.3/configure
./tclcl-1.0b11/configure
./xgraph-12.1/configure
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a$ sudo gedit tcl8.3.2/unix/dltest/configure


(gedit:13175): Gtk-CRITICAL **: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a$ sudo gedit tcl8.3.2/win/configure
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a$ 






oyuan/ns-allinone-2.1b8a/include -o src_rtg/classifier-sr.o src_rtg/classifier-sr.cc
src_rtg/classifier-sr.cc:38:22: fatal error: iostream.h: No such file or directory
compilation terminated.
make: *** [src_rtg/classifier-sr.o] Error 1
Ns make failed!




/usr/include/i386-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
src_rtg/sragent.cc:57:21: fatal error: fstream.h: No such file or directory
compilation terminated.
make: *** [src_rtg/sragent.o] Error 1




In file included from ./cmu-trace.h:43:0,
                 from src_rtg/sragent.cc:53:
./god.h: At global scope:
./god.h:88:14: error: extra qualification ‘vector::’ on member ‘operator=’ [-fpermissive]
./god.h:93:14: error: extra qualification ‘vector::’ on member ‘operator+=’ [-fpermissive]
./god.h:98:13: error: extra qualification ‘vector::’ on member ‘operator==’ [-fpermissive]
./god.h:101:13: error: extra qualification ‘vector::’ on member ‘operator!=’ [-fpermissive]
make: *** [src_rtg/sragent.o] Error 1






tcp-rbp.cc: At global scope:
tcp-rbp.cc:72:2: error: a class-key must be used when declaring a friend
tcp-rbp.cc:72:2: error: friend declaration does not name a class or function
tcp-rbp.cc: In member function ‘virtual void RBPVegasPaceTimer::expire(Event*)’:
tcp-rbp.cc:83:7: error: ‘void RBPVegasTcpAgent::paced_send_one()’ is protected
tcp-rbp.cc:104:62: error: within this context
tcp-rbp.cc: At global scope:
tcp-rbp.cc:234:2: error: a class-key must be used when declaring a friend
tcp-rbp.cc:234:2: error: friend declaration does not name a class or function
tcp-rbp.cc: In member function ‘virtual void RBPRenoPaceTimer::expire(Event*)’:
tcp-rbp.cc:245:7: error: ‘void RBPRenoTcpAgent::paced_send_one()’ is protected
tcp-rbp.cc:266:61: error: within this context
make: *** [tcp-rbp.o] Error 1
Ns make failed!






red.cc: In member function ‘virtual void REDQueue::trace(TracedVar*)’:
red.cc:630:35: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
red.cc:631:36: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
red.cc:632:36: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
make: *** [red.o] Error 1






patch file: ns-allinone-2.27/ns-2.27/queue/red.cc


REDQueue::trace(TracedVar* v)
{
- char wrk[500], *p;
+ char  wrk[500];
+ char* p;
- if (((p = strstr(v->name(), "ave")) == NULL) &&
-    ((p = strstr(v->name(), "prob")) == NULL) &&
-    ((p = strstr(v->name(), "curq")) == NULL) &&
-    ((p = strstr(v->name(), "cur_max_p"))==NULL) ) {
+ if (((p = const_cast <char*> (strstr(v->name(), "ave"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "prob"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "curq"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "cur_max_p")))==NULL) ) {
fprintf(stderr, "RED:unknown trace var %s\n",
v->name());
return;
}


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




cbq.cc: At global scope:
cbq.cc:112:2: error: ‘CBQueue’ does not name a type
cbq.cc: In member function ‘virtual int CBQueue::insert_class(CBQClass*)’:
cbq.cc:488:5: error: ‘class CBQClass’ has no member named ‘cbq_’
cbq.cc: In constructor ‘CBQClass::CBQClass()’:
cbq.cc:805:24: error: class ‘CBQClass’ does not have any field named ‘cbq_’
cbq.cc: In member function ‘virtual void CBQClass::recv(Packet*, Handler*)’:
cbq.cc:850:6: error: ‘cbq_’ was not declared in this scope
cbq.cc:856:7: error: ‘cbq_’ was not declared in this scope
cbq.cc: In member function ‘void CBQClass::update(Packet*, double)’:
cbq.cc:873:19: error: ‘cbq_’ was not declared in this scope
cbq.cc: In member function ‘int CBQClass::desc_with_demand()’:
cbq.cc:928:16: error: ‘cbq_’ was not declared in this scope
cbq.cc: In member function ‘void CBQClass::newallot(double)’:
cbq.cc:975:20: error: ‘cbq_’ was not declared in this scope
cbq.cc: In member function ‘virtual int CBQClass::command(int, const char* const*)’:
cbq.cc:1002:8: error: ‘cbq_’ was not declared in this scope
make: *** [cbq.o] Error 1






solution:$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/queue/cbq.cc
#define POWEROFTWO 16
+class CBQueue;
class CBQClass : public Connector 




=========================
In file included from ./tora/tora.h:52:0,
                 from tora/tora.cc:46:
./tora/tora_neighbor.h: At global scope:
./tora/tora_neighbor.h:72:9: error: ‘toraAgent’ does not name a type
tora/tora.cc: In member function ‘void toraAgent::rt_resolve(Packet*)’:
tora/tora.cc:238:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
tora/tora.cc: In member function ‘void toraAgent::recvTORA(Packet*)’:
tora/tora.cc:345:37: warning: reading through null pointer (argument 3) [-Wformat]
tora/tora.cc: In member function ‘void toraAgent::recvUPD(Packet*)’:
tora/tora.cc:464:42: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
tora/tora.cc: In member function ‘void toraAgent::recvCLR(Packet*)’:
tora/tora.cc:650:47: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
make: *** [tora/tora.o] Error 1
Ns make failed!


solution:$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/tora/tora_neighbor.h
#define __tora_neighbor_h__
+class toraAgent;
enum LinkStatus


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




include/i386-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
In file included from ./agent.h:41:0,
                 from tora/tora_neighbor.cc:40:
./packet.h: In constructor ‘p_info::p_info()’:
./packet.h:151:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:152:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:153:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:154:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:155:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:156:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:157:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:158:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:159:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:160:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:161:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:162:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:163:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:164:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:165:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:166:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:167:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:168:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:169:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:170:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:172:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:173:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:174:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:175:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:176:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:177:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:179:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:180:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:181:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:182:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:183:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:184:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:185:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:186:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:187:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:188:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:189:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:190:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:191:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:192:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:194:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:195:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:197:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:198:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:199:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:202:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:205:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:208:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:211:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:214:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:217:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:219:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
c++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o dsr/dsragent.o dsr/dsragent.cc
In file included from ./mac.h:46:0,
                 from dsr/dsragent.cc:56:
./route.h:46:0: warning: "INFINITY" redefined [enabled by default]
/usr/include/i386-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
In file included from ./agent.h:41:0,
                 from dsr/dsragent.cc:50:
./packet.h: In constructor ‘p_info::p_info()’:
./packet.h:151:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:152:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:153:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:154:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:155:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:156:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:157:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:158:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:159:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:160:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:161:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:162:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:163:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:164:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:165:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:166:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:167:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:168:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:169:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:170:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:172:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:173:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:174:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:175:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:176:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:177:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:179:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:180:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:181:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:182:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:183:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:184:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:185:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:186:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:187:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:188:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:189:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:190:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:191:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:192:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:194:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:195:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:197:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:198:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:199:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:202:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:205:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:208:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:211:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:214:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:217:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./packet.h:219:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::dropSendBuff(SRPacket&)’:
dsr/dsragent.cc:190:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::stickPacketInSendBuffer(SRPacket&)’:
dsr/dsragent.cc:206:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘virtual int DSRAgent::command(int, const char* const*)’:
dsr/dsragent.cc:416:53: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:420:55: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:424:55: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:428:54: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘virtual void DSRAgent::recv(Packet*, Handler*)’:
dsr/dsragent.cc:589:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::handlePktWithoutSR(SRPacket&, bool)’:
dsr/dsragent.cc:674:49: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:683:36: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::handleForwarding(SRPacket&)’:
dsr/dsragent.cc:767:42: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:777:57: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::handleRouteRequest(SRPacket&)’:
dsr/dsragent.cc:816:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:843:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:854:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:869:58: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘bool DSRAgent::replyFromRouteCache(SRPacket&)’:
dsr/dsragent.cc:967:61: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1009:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::sendOutPacketWithRoute(SRPacket&, bool, Time)’:
dsr/dsragent.cc:1053:65: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1069:29: error: ‘XmitFailureCallback’ was not declared in this scope
dsr/dsragent.cc:1085:70: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::getRouteForPacket(SRPacket&, ID, bool)’:
dsr/dsragent.cc:1188:54: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::sendOutRtReq(SRPacket&, int)’:
dsr/dsragent.cc:1229:57: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::returnSrcRteForOutsideDomainToRequestor(SRPacket&)’:
dsr/dsragent.cc:1305:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::returnSrcRouteToRequestor(SRPacket&)’:
dsr/dsragent.cc:1368:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::acceptRouteReply(SRPacket&)’:
dsr/dsragent.cc:1397:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1419:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1460:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::processBrokenRouteError(SRPacket&)’:
dsr/dsragent.cc:1502:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1532:55: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘virtual void DSRAgent::tap(const Packet*)’:
dsr/dsragent.cc:1589:66: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1598:53: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1615:34: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::sendRouteShortening(SRPacket&, int, int)’:
dsr/dsragent.cc:1704:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1752:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::undeliverablePkt(Packet*, int)’:
dsr/dsragent.cc:1887:47: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1897:58: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1907:57: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc: In member function ‘void DSRAgent::xmitFailed(Packet*)’:
dsr/dsragent.cc:1934:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1938:63: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:1946:61: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:2005:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:2021:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dsr/dsragent.cc:2040:28: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
make: *** [dsr/dsragent.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems


$gedit /usr/NS2/ns-allinone-2.29/ns-2.29/dsr/dsragent.cc
+void XmitFlowFailureCallback(Packet *pkt, void *data);  //+即增加,-即去掉
+void XmitFailureCallback(Packet *pkt, void *data); SendBuf management and helpers
=========================


diffusion/diffusion.cc: In member function ‘void DiffusionAgent::MACprepare(Packet*, nsaddr_t, int, bool)’:
diffusion/diffusion.cc:404:26: error: ‘XmitFailedCallback’ was not declared in this scope
make: *** [diffusion/diffusion.o] Error 1
Ns make failed!




solution:$gedit /usr/NS2/ns-allinone-2.29/ns-2.29/diffusion/diffusion.cc
#include "routing_table.h"
+void XmitFailedCallback(Packet *pkt, void *data);
char *MsgStr[]= {"", "INTEREST", "DATA", "DATA_READY", "DATA_REQUEST",
=============
diffusion/omni_mcast.cc: In member function ‘void OmniMcastAgent::MACprepare(Packet*, nsaddr_t, unsigned int, bool)’:
diffusion/omni_mcast.cc:367:26: error: ‘OmniMcastXmitFailedCallback’ was not declared in this scope
make: *** [diffusion/omni_mcast.o] Error 1
Ns make failed!




#include "god.h"
+void OmniMcastXmitFailedCallback(Packet *pkt, void *data);
static class OmniMcastClass : public TclClass {
=================


tfrc-sink.h: At global scope:
tfrc-sink.h:74:2: error: a class-key must be used when declaring a friend
tfrc-sink.h:74:2: error: friend declaration does not name a class or function
tfrc-sink.cc: In member function ‘virtual void TfrcNackTimer::expire(Event*)’:
tfrc-sink.cc:296:6: error: ‘void TfrcSinkAgent::nextpkt(double)’ is protected
tfrc-sink.cc:403:16: error: within this context
make: *** [tfrc-sink.o] Error 1
Ns make failed!


-friend ***
+friend  class  ***


=================
rio.cc: In member function ‘virtual void RIOQueue::trace(TracedVar*)’:
rio.cc:562:35: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
rio.cc:563:38: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
rio.cc:564:39: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
rio.cc:565:36: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
rio.cc:566:39: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
rio.cc:567:40: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
rio.cc:568:36: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
make: *** [rio.o] Error 1
Ns make failed!




patch file: ns-allinone-2.27/ns-2.27/queue/rio.cc


RIOQueue::trace(TracedVar* v)
{
- char wrk[500], *p;
+ char wrk[500];
+ char* p;
- if (((p = strstr(v->name(), "ave")) == NULL) &&
-    ((p = strstr(v->name(), "in_ave")) == NULL) &&
-    ((p = strstr(v->name(), "out_ave")) == NULL) &&
-    ((p = strstr(v->name(), "prob")) == NULL) &&
-    ((p = strstr(v->name(), "in_prob")) == NULL) &&
-    ((p = strstr(v->name(), "out_prob")) == NULL) &&
-    ((p = strstr(v->name(), "curq")) == NULL)) {
+ if (((p = const_cast <char*> (strstr(v->name(), "ave"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "in_ave"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "out_ave"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "prob"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "in_prob"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "out_prob"))) == NULL) &&
+    ((p = const_cast <char*> (strstr(v->name(), "curq"))) == NULL)) {
fprintf(stderr, "RIO:unknown trace var %s\n",
v->name());
return;
}
=======================


tcp-sack-rh.cc: At global scope:
tcp-sack-rh.cc:68:15: error: extra qualification ‘SackRHTcpAgent::’ on member ‘newack’ [-fpermissive]
make: *** [tcp-sack-rh.o] Error 1
Ns make failed!




patch file: ns-allinone-2.27/ns-2.27/tcp/tcp-sack-rh.cc


- virtual void SackRHTcpAgent::newack(Packet* pkt);
+ virtual void newack(Packet* pkt);
=====================
home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o mpls/ldp.o mpls/ldp.cc
mpls/ldp.cc:47:22: fatal error: iostream.h: No such file or directory
compilation terminated.
make: *** [mpls/ldp.o] Error 1
Ns make failed!




-#include <iostream.h>
+#include <iostream>
+using namespace std;
===========================


packet.h:162:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:163:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:164:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:165:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:166:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:167:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:168:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:169:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:170:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:172:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:173:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:174:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:175:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:176:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:177:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:179:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:180:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:181:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:182:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:183:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:184:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:185:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:186:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:187:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:188:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:189:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:190:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:191:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:192:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:194:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:195:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:197:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:198:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:199:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:202:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:205:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:208:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:211:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:214:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:217:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:219:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
c++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o simulator.o simulator.cc
In file included from channel.h:45:0,
                 from phy.h:60,
                 from node.h:57,
                 from simulator.cc:21:
packet.h: In constructor ‘p_info::p_info()’:
packet.h:151:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:152:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:153:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:154:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:155:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:156:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:157:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:158:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:159:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:160:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:161:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:162:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:163:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:164:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:165:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:166:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:167:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:168:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:169:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:170:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:172:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:173:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:174:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:175:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:176:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:177:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:179:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:180:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:181:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:182:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:183:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:184:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:185:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:186:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:187:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:188:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:189:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:190:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:191:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:192:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:194:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:195:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:197:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:198:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:199:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:202:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:205:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:208:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:211:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:214:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:217:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:219:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
route.h: At global scope:
route.h:81:13: warning: inline function ‘int RouteLogic::elements_in_level(int*, int)’ used but never defined [enabled by default]
rm -f gen/version.c
/home/linxiaoyuan/ns-allinone-2.1b8a/bin/tclsh8.3 bin/string2c.tcl version_string < VERSION > gen/version.c
gcc -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o gen/version.o gen/version.c
/home/linxiaoyuan/ns-allinone-2.1b8a/bin/tclsh8.3 bin/tcl-expand.tcl tcl/lib/ns-lib.tcl  | ../tclcl-1.0b11/tcl2c++ et_ns_lib > gen/ns_tcl.cc
c++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o gen/ns_tcl.o gen/ns_tcl.cc
c++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o ptypes2tcl.o ptypes2tcl.cc
In file included from ptypes2tcl.cc:3:0:
packet.h: In constructor ‘p_info::p_info()’:
packet.h:151:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:152:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:153:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:154:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:155:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:156:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:157:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:158:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:159:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:160:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:161:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:162:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:163:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:164:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:165:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:166:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:167:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:168:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:169:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:170:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:172:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:173:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:174:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:175:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:176:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:177:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:179:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:180:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:181:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:182:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:183:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:184:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:185:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:186:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:187:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:188:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:189:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:190:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:191:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:192:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:194:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:195:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:197:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:198:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:199:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:202:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:205:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:208:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:211:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:214:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:217:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:219:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc: In function ‘int main()’:
ptypes2tcl.cc:45:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:47:32: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:48:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:49:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:57:36: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:58:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:59:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:60:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:61:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:62:15: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:63:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:64:15: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:65:36: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:66:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:67:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:68:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:69:15: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:70:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ptypes2tcl.cc:71:15: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
c++  -o ptypes2tcl ptypes2tcl.o
./ptypes2tcl > gen/ptypes.cc
c++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o gen/ptypes.o gen/ptypes.cc
gcc -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o win32.o win32.c
c++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -o tclAppInit.o tclAppInit.cc
tclAppInit.cc: In function ‘int Tcl_AppInit(Tcl_Interp*)’:
tclAppInit.cc:169:67: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
tclAppInit.cc:169:67: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
c++  -o ns \
tclAppInit.o  random.o rng.o ranvar.o misc.o timer-handler.o scheduler.o object.o packet.o ip.o route.o connector.o ttl.o trace.o trace-ip.o classifier.o classifier-addr.o classifier-hash.o classifier-virtual.o classifier-mcast.o classifier-bst.o classifier-mpath.o replicator.o classifier-mac.o classifier-port.o src_rtg/classifier-sr.o src_rtg/sragent.o src_rtg/hdr_src.o ump.o app.o telnet.o tcplib-telnet.o trafgen.o traffictrace.o pareto.o expoo.o cbr_traffic.o tbf.o resv.o sa.o saack.o measuremod.o estimator.o adc.o ms-adc.o timewindow-est.o acto-adc.o pointsample-est.o salink.o actp-adc.o hb-adc.o expavg-est.o param-adc.o null-estimator.o adaptive-receiver.o vatrcvr.o consrcvr.o agent.o message.o udp.o session-rtp.o rtp.o rtcp.o ivs.o tcp.o tcp-sink.o tcp-reno.o tcp-newreno.o tcp-vegas.o tcp-rbp.o tcp-full.o baytcp/tcp-full-bay.o baytcp/ftpc.o baytcp/ftps.o scoreboard.o tcp-sack1.o tcp-fack.o tcp-asym.o tcp-asym-sink.o tcp-fs.o tcp-asym-fs.o tcp-int.o chost.o tcp-session.o nilist.o integrator.o queue-monitor.o flowmon.o loss-monitor.o queue.o drop-tail.o simple-intserv-sched.o red.o semantic-packetqueue.o semantic-red.o ack-recons.o sfq.o fq.o drr.o cbq.o hackloss.o errmodel.o fec.o delay.o snoop.o gaf/gaf.o dynalink.o rtProtoDV.o net-interface.o ctrMcast.o mcast_ctrl.o srm.o sessionhelper.o delaymodel.o srm-ssm.o srm-topo.o mftp.o mftp_snd.o mftp_rcv.o codeword.o alloc-address.o address.o lib/int.Vec.o lib/int.RVec.o lib/dmalloc_support.o webcache/http.o webcache/tcp-simple.o webcache/pagepool.o webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o webcache/mcache.o webcache/webtraf.o realaudio/realaudio.o lanRouter.o filter.o pkt-counter.o Decapsulator.o Encapsulator.o encap.o channel.o mac.o ll.o mac-802_11.o mac-802_3.o mac-tdma.o mip.o mip-reg.o gridkeeper.o propagation.o tworayground.o antenna.o omni-antenna.o shadowing.o bi-connector.o node.o mobilenode.o arp.o god.o dem.o topography.o modulation.o priqueue.o phy.o wired-phy.o wireless-phy.o mac-timers.o cmu-trace.o varp.o dsdv/dsdv.o dsdv/rtable.o rtqueue.o rttable.o imep/imep.o imep/dest_queue.o imep/imep_api.o imep/imep_rt.o imep/rxmit_queue.o imep/imep_timers.o imep/imep_util.o imep/imep_io.o tora/tora.o tora/tora_api.o tora/tora_dest.o tora/tora_io.o tora/tora_logs.o tora/tora_neighbor.o dsr/dsragent.o dsr/hdr_sr.o dsr/mobicache.o dsr/path.o dsr/requesttable.o dsr/routecache.o aodv/aodv_logs.o aodv/aodv.o ns-process.o satgeometry.o sathandoff.o satlink.o satnode.o satposition.o satroute.o sattrace.o rap/raplist.o rap/rap.o rap/media-app.o rap/utilities.o fsm.o tcp-abs.o diffusion/diffusion.o diffusion/diff_rate.o diffusion/diff_prob.o diffusion/diff_sink.o diffusion/flooding.o diffusion/omni_mcast.o diffusion/hash_table.o diffusion/routing_table.o diffusion/iflist.o tfrc.o tfrc-sink.o energy-model.o ping.o tcp-rfc793edu.o rio.o semantic-rio.o tcp-sack-rh.o scoreboard-rh.o plm/loss-monitor-plm.o plm/cbr-traffic-PP.o linkstate/hdr-ls.o mpls/classifier-addr-mpls.o mpls/ldp.o mpls/mpls-module.o rtmodule.o classifier-hier.o addr-params.o nix/hdr_nv.o nix/classifier-nix.o nix/nixnode.o routealgo/rnode.o routealgo/bfs.o routealgo/rbitmap.o routealgo/rlookup.o routealgo/routealgo.o nix/nixvec.o nix/nixroute.o diffserv/dsred.o diffserv/dsEdge.o diffserv/dsCore.o diffserv/dsPolicy.o diffserv/dsredq.o red-pd.o pushback/rate-limit.o pushback/rate-limit-strategy.o pushback/ident-tree.o pushback/agg-spec.o pushback/logging-data-struct.o pushback/rate-estimator.o pushback/pushback-queue.o pushback/pushback.o parentnode.o basetrace.o simulator.o  gen/version.o gen/ns_tcl.o gen/ptypes.o  win32.o -L/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -ltclcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -lotcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltk8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltcl8.3 -lXext -lX11 -lnsl -ldl -lm 
simulator.o: In function `Simulator::populate_hier_classifiers()':
simulator.cc:(.text+0x3d8): undefined reference to `RouteLogic::elements_in_level(int*, int)'
simulator.cc:(.text+0x518): undefined reference to `RouteLogic::elements_in_level(int*, int)'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems


I am giving u a workaround, I solved it this way, but I really didn't
like it. 


RouteLogic::elements_in_level(int*, int) is an inline function in
route.h, if you prevent it from being inline, i.e. remove the inline
keyword & move the method defn to route.cc, then it will compile, I
really didn't understand why its defn was not available outside route.o,
if you do 'nm route.o', with ur current status you will find it as
'UNDEF', I didn't understand why, normally it shouldn't show as UNDEF
but as GLOBAL, I don't know if this is due to some compiler
"over-optimizations" :-)


Gautam






***************************************************************


=====================终于安装上去了  不容易啊
Please put /home/linxiaoyuan/ns-allinone-2.1b8a/bin:/home/linxiaoyuan/ns-allinone-2.1b8a/tcl8.3.2/unix:/home/linxiaoyuan/ns-allinone-2.1b8a/tk8.3.2/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.


IMPORTANT NOTICES:


(1) You MUST put /home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7, /home/linxiaoyuan/ns-allinone-2.1b8a/lib, 
    into your LD_LIBRARY_PATH environment variable.
    If it complains about X libraries, add path to your X libraries 
    into LD_LIBRARY_PATH.
    If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
    If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>


(2) You MUST put /home/linxiaoyuan/ns-allinone-2.1b8a/tcl8.3.2/library into your TCL_LIBRARY environmental
    variable. Otherwise ns/nam will complain during startup.


(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.3.2 
    and tk8.3.2. They are now installed under /home/linxiaoyuan/ns-allinone-2.1b8a/{bin,include,lib}


After these steps, you can now run the ns validation suite with
cd ns-2.1b8a; ./validate


For trouble shooting, please first read ns problems page 
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.






========================
./god.h:88:14: error: extra qualification ‘vector::’ on member ‘operator=’ [-fpermissive]
nam  sudo make  报错 
In file included from netview.cc:51:0:
node.h:171:10: error: extra qualification ‘Node::’ on member ‘getTclScriptLabel’ [-fpermissive]
node.h: In member function ‘virtual char* BoxNode::style()’:
node.h:222:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
node.h: In member function ‘virtual char* CircleNode::style()’:
node.h:233:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
node.h: In member function ‘virtual char* HexagonNode::style()’:
node.h:244:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
node.h: In member function ‘virtual char* VirtualNode::style()’:
node.h:260:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
make: *** [netview.o] Error 1


去掉‘Node::getTclScriptLabel’ 中的node::


===================
In file included from netmodel.cc:59:0:
agent.h: At global scope:
agent.h:73:64: error: invalid pure specifier (only ‘= 0’ is allowed) before ‘;’ token
netmodel.cc: In member function ‘virtual void NetModel::handle(const TraceEvent&, double, int)’:


把对应行的NULL改成0;
==========
In file included from netmodel.cc:53:0:
queue.h:48:2: error: a class-key must be used when declaring a friend
queue.h:48:2: error: friend declaration does not name a class or function






-friend   Queue;
+friend class  Queue;
========


In file included from graphview.h:41:0,
                 from graphview.cc:45:
netgraph.h:71:15: error: extra qualification ‘NetGraph::’ on member ‘render’ [-fpermissive]


-virtual void NetGraph::render(GraphView* view);
+virtual void render(GraphView* view);
========================


ltcl8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3 -lz -lXext -lX11 -lnsl -ldl -lm 
/usr/bin/ld: errno: TLS definition in /lib/i386-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in /home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3/libz.a(gzio.o)
/lib/i386-linux-gnu/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [nam] Error 1






 [-Wwrite-strings]
parser.cc:517:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:517:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:517:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:518:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:518:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:518:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:519:91: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:519:91: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:519:91: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:520:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:520:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:520:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:521:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:521:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:521:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:522:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:522:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:522:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:523:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:523:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:523:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:524:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:524:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:524:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:527:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:528:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:528:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:528:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:529:74: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:529:74: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:529:74: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:530:71: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:530:71: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:530:71: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:531:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:531:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:531:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:532:87: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:532:87: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:532:87: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:535:38: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:536:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:536:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:536:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:537:74: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:537:74: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:537:74: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:538:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:538:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:538:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:539:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:539:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:539:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:540:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:540:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:540:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:543:39: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:544:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:544:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:544:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:545:75: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:545:75: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:545:75: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:546:71: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:546:71: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:546:71: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:547:83: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:547:83: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:547:83: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:548:110: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:548:110: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:548:110: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:549:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:549:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:549:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:552:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:553:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:553:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:553:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:554:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:554:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:554:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:555:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:555:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:555:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:556:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:556:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:556:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:557:105: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:557:105: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:557:105: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:558:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:558:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:558:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:559:95: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:559:95: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:559:95: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:560:86: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:560:86: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:560:86: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:561:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:561:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:561:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:564:52: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:565:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:565:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:565:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:566:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:566:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:566:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:568:52: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:569:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:569:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:569:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:570:70: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:570:70: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:570:70: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:571:66: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:571:66: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:571:66: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:574:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:577:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:578:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:578:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:578:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:579:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:579:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:579:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:580:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:580:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:580:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:583:61: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:584:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:584:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:584:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:588:92: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:589:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:589:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:589:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:590:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:590:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:590:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:591:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:591:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:591:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:592:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:592:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:592:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:593:92: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:593:92: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:593:92: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:594:90: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:594:90: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:594:90: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:595:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:595:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:595:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:596:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:596:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:596:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:597:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:597:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:597:79: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:601:78: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:602:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:602:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:602:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:603:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:603:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:603:64: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:604:77: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:604:77: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:604:77: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:607:72: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:608:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:608:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:608:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:609:72: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:609:72: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:609:72: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:610:77: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:610:77: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:610:77: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:611:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:611:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:611:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:614:40: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:615:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:615:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:615:68: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:616:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:616:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:616:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:617:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:617:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:617:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:618:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:618:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:618:81: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:619:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:619:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:619:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:620:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:620:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cc:620:93: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rm -f trafficsource.o; c++ -o trafficsource.o -c -O2 -DTCL_TK  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H -DHAVE_LIBZ1_1_3 -DHAVE_ZLIB_H  -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3  trafficsource.cc
In file included from trafficsource.cc:42:0:
node.h: In member function ‘virtual char* BoxNode::style()’:
node.h:222:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
node.h: In member function ‘virtual char* CircleNode::style()’:
node.h:233:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
node.h: In member function ‘virtual char* HexagonNode::style()’:
node.h:244:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
node.h: In member function ‘virtual char* VirtualNode::style()’:
node.h:260:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
trafficsource.cc: In member function ‘void TrafficSource::setDefaults()’:
trafficsource.cc:142:12: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rm -f gen/version.c
/home/linxiaoyuan/ns-allinone-2.1b8a/bin/tclsh8.3 bin/string2c.tcl version < VERSION > gen/version.c
rm -f gen/version.o; gcc -o gen/version.o -c -O2 -DTCL_TK  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H -DHAVE_LIBZ1_1_3 -DHAVE_ZLIB_H  -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3  gen/version.c
rm -f gen/nam_tcl.cc
/home/linxiaoyuan/ns-allinone-2.1b8a/bin/tclsh8.3 bin/tcl-expand.tcl tcl/nam-lib.tcl | ../tclcl-1.0b11/tcl2c++ et_nam > gen/nam_tcl.cc
rm -f gen/nam_tcl.o; c++ -o gen/nam_tcl.o -c -O2 -DTCL_TK  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H -DHAVE_LIBZ1_1_3 -DHAVE_ZLIB_H  -I. -I/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -I/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/include -I/home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3  gen/nam_tcl.cc
rm -f nam
c++   -o nam \
tkcompat.o tkUnixInit.o xwd.o netview.o netmodel.o edge.o packet.o node.o main.o trace.o queue.o drop.o animation.o agent.o feature.o route.o transform.o paint.o state.o monitor.o anetmodel.o random.o rng.o view.o graphview.o netgraph.o tracehook.o lan.o psview.o group.o editview.o tag.o address.o animator.o wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o trafficsource.o gen/version.o gen/nam_tcl.o  -L/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -ltclcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -lotcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltk8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltcl8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3 -lz -lXext -lX11 -lnsl -ldl -lm 
/usr/bin/ld: errno: TLS definition in /lib/i386-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in /home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3/libz.a(gzio.o)
/lib/i386-linux-gnu/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [nam] Error 1
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a/nam-1.0a10$ gcc
gcc: No input files
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a/nam-1.0a10$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux-gnu/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a/nam-1.0a10$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a/nam-1.0a10$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix








/usr/bin/ld: errno: TLS definition in /lib/i386-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in /home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3/libz.a(gzio.o)
/lib/i386-linux-gnu/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [nam] Error 1


/usr/bin/ld: errno: TLS definition in /lib/i386-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in /home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3/libz.a(gzio.o)
/lib/i386-linux-gnu/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [nam] Error 1


/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches
non-TLS reference in [...


------------


c++   -o nam 
tkcompat.o tkUnixInit.o xwd.o netview.o netmodel.o edge.o packet.o node.o main.o trace.o queue.o drop.o animation.o agent.o feature.o route.o transform.o paint.o state.o monitor.o anetmodel.o random.o rng.o view.o graphview.o netgraph.o tracehook.o lan.o psview.o group.o editview.o tag.o address.o animator.o wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o trafficsource.o gen/version.o gen/nam_tcl.o  -L/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -ltclcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -lotcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltk8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltcl8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3 -lz -lXext -lX11 -lnsl -ldl -lm -include /usr/include/errno.h
tkcompat.o tkUnixInit.o xwd.o netview.o netmodel.o edge.o packet.o node.o main.o trace.o queue.o drop.o animation.o agent.o feature.o route.o transform.o paint.o state.o monitor.o anetmodel.o random.o rng.o view.o graphview.o netgraph.o tracehook.o lan.o psview.o group.o editview.o tag.o address.o animator.o wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o trafficsource.o gen/version.o gen/nam_tcl.o  -L/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.0b11 -ltclcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/otcl-1.0a7 -lotcl -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltk8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/lib -ltcl8.3 -L/home/linxiaoyuan/ns-allinone-2.1b8a/zlib-1.1.3 -lz -lXext -lX11 -lnsl -ldl -lm -include /usr/include/errno.h




一直解决不了, 网上说直接添加一个 /usr/include/errno.h 到Makefile里,或者在cc文件中添加#include <errno.h>


不过我这里都没解决最后从网上下载了一个对应的zlib-1.1.3包,安装以后
sudo ./configure
然后把Makefile中的所有 原来对应的zlib文件夹路径都换成最新安装的那个,
然后sudo make 
可以通过


================================
但是 nam 得到的nam所有的文字存在可是颜色和其他的是一样的,所以看不到任何图像,








不得已 ,只能 将里面的其他东西全部替换掉来试,具体方法将会在下一篇介绍。


原创粉丝点击