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

Re: [ns] compilation problem.




va_start is ANSI C... try "man va_start".
   -John Heidemann

>Hi all,
>
>I have some problems "make"ing ns-2.1b8 (see below).  Compile failed on
>line 107 of object.cc, and line 107 of object.cc is as follows:
>
>102 void NsObject::debug(const char *fmt, ...)
>103 {
>104        if (!debug_)
>105                 return;
>106         va_list ap;
>107         va_start(ap, fmt);
>108         vprintf(fmt, ap);
>109 }
>
>does anyone know where is "va_start(...)" defined?  I couldn't find either
>"va_start" or "__builtin_va_alist" in any of the files in the ns-2.1b8
>directory/subdirectories.  
>
>
>===============================================================
>...
>g++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR
>-DNDEBUG -DHAVE_STL -mv8 -msupersparc -D__svr4__ -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/bbcr6/.automount/u/wwszeto/bin/tclcl-1.0b11 -I/usr/include
>-I/usr/include -I/usr/include -o scheduler.o scheduler.cc
>g++ -c -O2 -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR
>-DNDEBUG -DHAVE_STL -mv8 -msupersparc -D__svr4__ -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/bbcr6/.automount/u/wwszeto/bin/tclcl-1.0b11 -I/usr/include
>-I/usr/include -I/usr/include -o object.o object.cc
>object.cc: In method `void NsObject::debug(const char *, ...)':
>object.cc:107: `__builtin_va_alist' undeclared (first use this function)
>object.cc:107: (Each undeclared identifier is reported only once
>object.cc:107: for each function it appears in.)
>*** Error code 1
>make: Fatal error: Command failed for target `object.o'
>
>===============================================================
>
>