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

[ns] problem encounted while building ns2 for windows 98



Hello,

I have downloaded tcl8.0.4, tk8.0.4, otcl-1.0a5, tclcl-1.0b9, and ns-2.1b6
and unzip them into a directory c:\netsim.

No problem faced while compiling for tcl, tk and otcl using VC++ 5 on
windows98. But when I try to build tclcl, I faced these lines of errors:

tclcl.h (209): error c2086: 'localName':redefinition
tclcl.h (210): error c2086: 'localName':redefinition
tclcl.h (211): error c2086: 'localName':redefinition
tclcl.h (212): error c2086: 'localName':redefinition
tclcl.h (213): error c2086: 'localName':redefinition
tclcl.h (214): error c2086: 'localName':redefinition
tclcl.h (215): error c2086: 'localName':redefinition
tclcl.h (216): error c2086: 'localName':redefinition

tcl.cc (973) : warning C4003: not enough actual parameters for marco 'TOB'
tcl.cc (974) : warning C4003: not enough actual parameters for marco 'TOB'
tcl.cc (975) : warning C4003: not enough actual parameters for marco 'TOB'
tcl.cc (976) : warning C4003: not enough actual parameters for marco 'TOB'
tcl.cc (977) : warning C4003: not enough actual parameters for marco 'TOB'
tcl.cc (978) : warning C4003: not enough actual parameters for marco 'TOB'

tcl.cc (1095) : error c2511 : 'delay_bind_bw': overloaded member function
not found in tclobject
tcl.cc (1096) : error c2511 : 'delay_bind_bw': overloaded member function
not found in tclobject
tcl.cc (1097) : error c2511 : 'delay_bind_bw': overloaded member function
not found in tclobject
tcl.cc (1098) : error c2511 : 'delay_bind_bw': overloaded member function
not found in tclobject
tcl.cc (1099) : error c2511 : 'delay_bind_bw': overloaded member function
not found in tclobject
tcl.cc (1100) : error c2511 : 'delay_bind_bw': overloaded member function
not found in tclobject
tcl.cc (1101) : error c2511 : 'delay_bind_bw': overloaded member function
not found in tclobject


Would anyone please help me. Your great help is very much appreciated.

Thanks & regards,

William Wong




The makefile.vc & makefile.win files details are as follow:




The makefile.vc in tclcl-1.0b9 is as follows:

#
# Copyright (c) 1993-1994 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the University of
#	California, Berkeley and the Network Research Group at
#	Lawrence Berkeley Laboratory.
# 4. Neither the name of the University nor of the Laboratory may be used
#    to endorse or promote products derived from this software without
#    specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#) $Header: /usr/src/mash/repository/common/Tcl/makefile.vc,v 1.16
1999/12/20 17:43:44 haoboy Exp $ (LBL)
#

BLANK	= # make a blank space.  DO NOT add anything to this line

# The following will be redefined under Windows (see WIN32 lable below)
CC	= @CC@
CPP	= @CXX@
LINK	= $(CPP)
MKDEP	= ./conf/mkdep
TCLSH	= @V_TCLSH@
TCL2C	= ./tcl2c++
AR	= ar rc $(BLANK)

RANLIB	= @RANLIB@
INSTALL	= @INSTALL@
LN	= ln
TEST	= test
RM	= rm -f
PERL	= perl


CCOPT	= @V_CCOPT@
STATIC	= @V_STATIC@
LDFLAGS	= $(STATIC)
LDOUT	= -o $(BLANK)

DEFINE	= -DNO_TK @V_DEFINE@ @V_DEFINES@ @DEFS@

INCLUDES = \
	-I. @V_INCLUDES@

LIB	= \
	@V_LIBS@

CFLAGS	= $(CCOPT) $(DEFINE)

# Explicitly define compilation rules since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
.SUFFIXES: .cc	# $(.SUFFIXES)

.cc.o:
	@rm -f $@
	$(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cc

.c.o:
	@rm -f $@
	$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $*.c


GEN_DIR	= gen/
LIB_TCLCL = @V_ALL@
LIBRARY_TK = @V_LIBRARY_TK@
LIBRARY_TCL = @V_LIBRARY_TCL@


TCL_80_LIBRARY_FILES = \
	$(LIBRARY_TCL)/init.tcl \
	$(LIBRARY_TCL)/history.tcl \
	$(LIBRARY_TCL)/word.tcl \
	$(LIBRARY_TCL)/http2.0/http.tcl
TCL_81_LIBRARY_FILES = $(TCL_80_LIBRARY_FILES)
TCL_82_LIBRARY_FILES = \
	$(LIBRARY_TCL)/init.tcl \
	$(LIBRARY_TCL)/history.tcl \
	$(LIBRARY_TCL)/word.tcl \
	$(LIBRARY_TCL)/http2.1/http.tcl
TCL_76_LIBRARY_FILES = \
	$(LIBRARY_TCL)/init.tcl

TCL_LIBRARY_FILES = \
	@V_TCL_LIBRARY_FILES@

#TKDOSNAMES = \
#	$(LIBRARY_TK)/optionMenu.tcl \
#	$(LIBRARY_TK)/scrollbar.tcl
TKDOSNAMES = @V_TKDOSNAMES@

OBJ_COMPAT_C =

# WIN32: uncomment the following line to be use with vc++ nmake
!include <conf/makefile.win>

TK_LIBRARY_FILES = \
		$(TCL_LIBRARY_FILES) \
		$(LIBRARY_TK)/tk.tcl \
		$(LIBRARY_TK)/clrpick.tcl \
		$(LIBRARY_TK)/comdlg.tcl \
		$(LIBRARY_TK)/button.tcl \
		$(LIBRARY_TK)/dialog.tcl \
		$(LIBRARY_TK)/entry.tcl \
		$(LIBRARY_TK)/focus.tcl \
		$(LIBRARY_TK)/listbox.tcl \
		$(LIBRARY_TK)/menu.tcl \
		$(LIBRARY_TK)/palette.tcl \
		$(LIBRARY_TK)/scale.tcl \
		$(LIBRARY_TK)/tearoff.tcl \
		$(LIBRARY_TK)/text.tcl \
		$(LIBRARY_TK)/tkfbox.tcl \
		$(LIBRARY_TK)/msgbox.tcl \
		$(TKDOSNAMES)

CONSOLE_FILES = $(LIBRARY_TK)/console.tcl

OBJ_CC = Tcl.o Tcl2.o idlecallback.o iohandler.o timer.o rate-variable.o \
	tracedvar.o \
	embedded-tcl.o embedded-tk.o embedded-tclobj.o $(OBJ_COMPAT_CC)

SRC =	$(OBJ_CC:.o=.cc) $(OBJ_COMPAT_C:.o=.c)

all:	$(TCL2C) $(LIB_TCLCL)

$(TCL2C): tcl2c++.o
	$(RM) $@
	$(LINK) $(STATIC) $(LDFLAGS) $(LDOUT)$@ tcl2c++.o

# We used to link to libTcl.a for backwards compatibilty, but no more.
$(LIB_TCLCL): $(OBJ_CC) $(OBJ_COMPAT_C)
	$(RM) $@
	$(AR)$@ $(OBJ_CC) $(OBJ_COMPAT_C)
	$(RANLIB) $@

#
# pass-1 embedded tcl files
#
embedded-tcl.cc: $(TCL_LIBRARY_FILES) $(TCL2C)
	$(RM) $@
	$(TCL2C) et_tcl $(TCL_LIBRARY_FILES) > $@

embedded-tk.cc: $(TK_LIBRARY_FILES) $(TCL2C)
	$(RM) $@
	$(TCL2C) et_tk $(TK_LIBRARY_FILES) > $@

embedded-tclobj.cc: tcl-object.tcl tcl-import.tcl tcl-http.tcl $(TCL2C)
	$(RM) $@
	$(TCL2C) et_tclobject tcl-object.tcl tcl-import.tcl tcl-http.tcl > $@

#
# pass-1 console tcl files
#
embedded-console.cc: $(CONSOLE_FILES) $(TCL2C)
	$(RM) embedded-console.o
	$(TCL2C) et_console $(CONSOLE_FILES) > embedded-console.cc

install: force
	cp $(LIB_TCLCL) @prefix@/lib/libtclcl.a

# libTcl is no longer installed as of 13-Nov-99
#	-test -f @prefix@/lib/libTcl.a && rm -f @prefix@/lib/libTcl.a || true
#	ln -s @prefix@/lib/libtclcl.a @prefix@/lib/libTcl.a

clean:
	$(RM) $(LIB_TCLCL) $(TCL2C) *.o config.log config.cache \
	embedded-tk.cc embedded-tclobj.cc

realclean:
	$(MAKE) clean
	rm -f config.log config.cache config.status

tags:	force
	ctags -tdwC $(SRC) *.h $(TKSRC)/*.c $(TKSRC)/*.h \
		$(TCLSRC)/*.c $(TCLSRC)/*.h

force:

depend:
	$(MKDEP) $(INCLUDES) $(DEFINE) $(SRC)

tar:	force
	tar=tclcl-`cat VERSION`-@[email protected] ; \
	rm -f $$tar ; \
	@V_TARCMD@ - README CHANGES.html @V_TAR_EXTRA@ $(ALL) | \
		gzip -c > $$tar

srctar: force
	@cwd=`pwd` ; dir=`basename $$cwd` ; \
	    name=tclcl-`cat VERSION | tr A-Z a-z` ; \
	    tar=tclcl-src-`cat VERSION`.tar.gz ; \
	    list="" ; \
	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
	    echo \
	    "(rm -f $$tar; cd .. ; ln -s $$dir $$name)" ; \
	     (rm -f $$tar; cd .. ; ln -s $$dir $$name) ; \
	    echo \
	    "(cd .. ; tar cfh $$tar [lots of files])" ; \
	     (cd .. ; tar cfh - $$list) | gzip -c > $$tar ; \
	    echo \
	    "rm ../$$name; chmod 444 $$tar" ;  \
	     rm ../$$name; chmod 444 $$tar

# Create makefile.vc for Win32 development by replacing:
# "# !include ..." 	-> 	"!include ..."
makefile.vc:	Makefile.in
	$(PERL) -pe 's/^# (\!include)/\!include/o' < Makefile.in > makefile.vc





The makefile.win file in tclcl-1.0b9\conf is as follows:

#  Copyright (c) 1994, 1995, 1996
# 	The Regents of the University of California.  All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that: (1) source code distributions
#  retain the above copyright notice and this paragraph in its entirety, (2)
#  distributions including binary code include the above copyright notice
and
#  this paragraph in its entirety in the documentation or other materials
#  provided with the distribution, and (3) all advertising materials
mentioning
#  features or use of this software display the following acknowledgement:
#  ``This product includes software developed by the University of
California,
#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
#  the University nor the names of its contributors may be used to endorse
#  or promote products derived from this software without specific prior
#  written permission.
#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# @(#) $Header: /usr/src/mash/repository/common/conf/makefile.win,v 1.10
1999/12/20 19:26:02 haoboy Exp $

# Please change this path to the correct one on your system.
MSVCDIR = c:\progra~1\devstudio\vc
TOOLS32	= $(MSVCDIR)
PATH	= $(MSVCDIR);$(PATH)
INCLUDE	= $(MSVCDIR)\include
# Set this to the _absolute_ path to where ns-allinone is installed.
# Tcl/Tk/otcl/tclcl/ns should all be located under this path.
LOCAL_SRC = c:\netsim

# comment this out to build with debug options
# NODEBUG=1
TARGETOS = BOTH

# uncomment this out to build static version
#STATIC_LIB=1

!include <$(INCLUDE)/win32.mak>

cc32	= cl
rc32	= rc
link32	= link

# uncomment this to use tcl/tk 8
USE_TCL_80 = 1

!if "$(USE_TCL_80)" == "1"
TK_VER = 80
TCL_VER = 80
!else
TCL_VER = 76
TK_VER  = 42
!endif

!if "$(USE_TCL_80)" == "1"
TCL_SUFFIX = 8.0.4
TK_SUFFIX = 8.0.4
TCL_LIBRARY_FILES = $(TCL_80_LIBRARY_FILES)
!else
TCL_SUFFIX = 7.6
TK_SUFFIX = 4.2
TCL_LIBRARY_FILES = $(TCL_76_LIBRARY_FILES)
!endif


TK_DIR = $(LOCAL_SRC)\tk80~1.4
TCL_DIR = $(LOCAL_SRC)\tcl80~1.4
OTCL_DIR = $(LOCAL_SRC)\otcl-1.0a5
TCLCL_DIR = $(LOCAL_SRC)\tclcl-1.0b9

# Static build requires specially hacked versions of tcl8.0 and tk8.0
# Available from http://mash.cs.berkeley.edu/dist
!ifdef STATIC_LIB
LIB_TK	= -LIBPATH:$(TK_DIR)\win stk$(TK_VER).lib
LIB_TCL = -LIBPATH:$(TCL_DIR)\win stcl$(TCL_VER).lib
!else
LIB_TK	= -LIBPATH:$(TK_DIR)\win\Release tk$(TK_VER).lib
LIB_TCL = -LIBPATH:$(TCL_DIR)\win\Release tcl$(TCL_VER).lib
!endif
LIB_OTCL = -LIBPATH:$(OTCL_DIR) otcl.lib
LIB_TCLCL = $(TCLCL_DIR)\tclcl.lib

LIBRARY_TK = $(TK_DIR)\library
LIBRARY_TCL = $(TCL_DIR)\library

TKDOSNAMES = $(LIBRARY_TK)/optMenu.tcl $(LIBRARY_TK)/scrlbar.tcl


CC	= $(cc32)
CPP	= $(cc32)
LINK	= $(link32)
MKDEP	= makedep2
TCLSH	= $(TCL_DIR)\win\Release\tclsh80.exe
TCL2C	= $(TCLCL_DIR)\tcl2c++.exe
AR	= lib -out:

RANLIB	= echo
INSTALL	= echo
LN	= echo
TEST	= echo
RM	= erase
PERL	= perl


!IFDEF NODEBUG
CCOPT   = -Ox -Zm1000
!ELSE
CCOPT	= -Gm -Gi -YX -Zm1000
!ENDIF

# Include STATIC_LIB so that main.cc will be properly compiled for nam.
!ifdef STATIC_LIB
CCOPT = -DSTATIC_LIB $(CCOPT)
!endif

!IFDEF NODEBUG
LDFLAGS = -LIBPATH:$(TOOLS32)\lib $(lflags) $(conlibsdll)
!ELSE
LDFLAGS = -LIBPATH:$(TOOLS32)\lib /NODEFAULTLIB /INCREMENTAL:NO /DEBUG
/NOLOGO $(conlibsdll)
!ENDIF
STATIC	=
LDOUT	= -out:

DEFINE	= -DNO_TK

INCLUDE_TK = -I$(TK_DIR)\win -I$(TK_DIR)\generic
INCLUDE_TCL = -I$(TCL_DIR)\win -I$(TCL_DIR)\generic
INCLUDE_OTCL = -I$(OTCL_DIR)
INCLUDE_TCLCL = -I$(TCLCL_DIR)
#       INCLUDE_X11 = -I$(TK_DIR)\xlib
INCLUDE_X11 = -I$(TK_DIR)\xlib\X11
INCLUDE_MISC = -I$(TOOLS32)\include


OBJ_COMPAT_C = compat/gettod.o compat/win32.o embedded-console.o


# don't want system files to be added when making dependencies
DEPEND_INCS = \
	$(INCLUDE_TK) $(INCLUDE_TCL) \
	$(INCLUDE_OTCL) $(INCLUDE_TCLCL) \
	$(INCLUDE_X11) $(MD_INC) -I.
INCLUDES = $(DEPEND_INCS) $(INCLUDE_MISC)

LIB =	$(LIB_TCLCL) $(LIB_OTCL) \
	$(LIB_TK) $(LIB_TCL) \
	$(guilibsdll)
#	$(LIB_GRABBER) $(LIB_GSM) \
#	winmm.lib

CFLAGS	= $(cdebug:Z7=Zi) $(cflags) $(cvarsdll) $(CCOPT) $(DEFINE)

.SUFFIXES : .cc


# add -FR$*.sbr if you want browse info
.cc.o:
	$(cc32) -c $(CFLAGS) $(INCLUDES) -Fo$@ -Tp $<

.c.o:
	$(cc32) -c $(CFLAGS) $(INCLUDES) -Fo$@ $<


GEN_DIR	= gen\\
LIB_DIR	= lib\\
NS	= ns.exe
NSX	= nsx.exe
NAM	= nam.exe