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

[ns] Ns-2 link error,ns2.1b6+tclcl1.0b9+otcl1.0a4+tk8.0.5+tcl8.0.5



Hi,all!

I have some troubles when installing Ns-2 under Win98.
my configuration is below:

Win98
VC6.0
tcl8.0.5
tk8.0.5
otcl-1.0a4
tclcl-1.0b9
ns-2.1b6

I follows the steps described in ns-build.html to install my ns-2.
and tcl8.0.5 get right,tk8.0.5 get right,otcl-1.0a4 get right,
tclcl-1.0b9 get right!
when i install ns-2,i got troubles,it seems that
the macro __FUNCTION__ in cmu-trace.cc is not defined,
so i replace it with __PRETTY_FUNCTION__ in cmu-trace to let installsion continue.It seems it complied well,but when i almost finish installing ns,i got a link error---LNK2001,follows is the details:

varp.cc
	cl -c -Ox -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo
 -D_X86_=1 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -DWIN32  -D_WIN32 
-D_MT -D_DLL -MD -Ox -Zm1000 -DNO_TK 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\generic
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\generic  
-ID:\Lew\keti\ns\NetSim\otcl-1.0a4 
-ID:\Lew\keti\ns\NetSim\tclcl-1.0b9  
-ID:\Lew\keti\ns\NetSim\tk8.0.5\xlib  
-I. -Ie:\micros~1\vc98\include -Fons-process.o -Tp ns-process.cc
ns-process.cc
	cl -c -Ox -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo 
-D_X86_=1 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -DWIN32  -D_WIN32 
-D_MT -D_DLL -MD -Ox -Zm1000 -DNO_TK 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\generic 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\generic  
-ID:\Lew\keti\ns\NetSim\otcl-1.0a4 
-ID:\Lew\keti\ns\NetSim\tclcl-1.0b9  
-ID:\Lew\keti\ns\NetSim\tk8.0.5\xlib  
-I. -Ie:\micros~1\vc98\include -Fofsm.o -Tp fsm.cc
fsm.cc
	cl -c -Ox -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo 
-D_X86_=1 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -DWIN32  -D_WIN32 
-D_MT -D_DLL -MD -Ox -Zm1000 -DNO_TK 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\generic 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\generic  
-ID:\Lew\keti\ns\NetSim\otcl-1.0a4 
-ID:\Lew\keti\ns\NetSim\tclcl-1.0b9  
-ID:\Lew\keti\ns\NetSim\tk8.0.5\xlib  
-I. -Ie:\micros~1\vc98\include -Fotcp-abs.o -Tp tcp-abs.cc
tcp-abs.cc
tcp-abs.cc(28) : warning C4355: 'this' : used in base member initializer list
tcp-abs.cc(273) : warning C4355: 'this' : used in base member initializer list
tcp-abs.cc(301) : warning C4138: '*/' found outside of comment
	cl -c -Ox -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo 
-D_X86_=1 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -DWIN32  -D_WIN32 
-D_MT -D_DLL -MD -Ox -Zm1000 -DNO_TK 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\generic 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\generic  
-ID:\Lew\keti\ns\NetSim\otcl-1.0a4 
-ID:\Lew\keti\ns\NetSim\tclcl-1.0b9  
-ID:\Lew\keti\ns\NetSim\tk8.0.5\xlib  
-I. -Ie:\micros~1\vc98\include -Foptypes2tcl.o -Tp ptypes2tcl.cc
ptypes2tcl.cc
	link -LIBPATH:e:\micros~1\vc98\lib /NODEFAULTLIB 
/INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO msvcrt.lib oldnames.lib 
kernel32.lib  ws2_32.lib mswsock.lib advapi32.lib -out:ptypes2tcl.exe 
ptypes2tcl.o
	.\ptypes2tcl.exe > gen\\ptypes.cc
	cl -c -Ox -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo 
-D_X86_=1 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -DWIN32  
-D_WIN32 -D_MT -D_DLL -MD -Ox -Zm1000 -DNO_TK 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\generic 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\generic  
-ID:\Lew\keti\ns\NetSim\otcl-1.0a4 
-ID:\Lew\keti\ns\NetSim\tclcl-1.0b9  
-ID:\Lew\keti\ns\NetSim\tk8.0.5\xlib  
-I. -Ie:\micros~1\vc98\include -Fogen\\ptypes.o -Tp gen\\ptypes.cc
ptypes.cc
	cl -c -Ox -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo 
-D_X86_=1 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -DWIN32  -D_WIN32 -D_MT 
-D_DLL -MD -Ox -Zm1000 -DNO_TK -ID:\Lew\keti\ns\NetSim\tk8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\generic 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\generic  
-ID:\Lew\keti\ns\NetSim\otcl-1.0a4 
-ID:\Lew\keti\ns\NetSim\tclcl-1.0b9  
-ID:\Lew\keti\ns\NetSim\tk8.0.5\xlib  
-I. -Ie:\micros~1\vc98\include -Fowin32.o win32.c
win32.c
config.h(246) : warning C4273: 'getpid' : inconsistent dll linkage.  dllexport assumed.
win32.c(147) : warning C4273: '__p___argc' : inconsistent dll linkage.  dllexport assumed.
win32.c(148) : warning C4273: '__p___argv' : inconsistent dll linkage.  dllexport assumed.
	cl -c -Ox -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo 
-D_X86_=1 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -DWIN32  
-D_WIN32 -D_MT -D_DLL -MD -Ox -Zm1000 -DNO_TK 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tk8.0.5\generic 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\win 
-ID:\Lew\keti\ns\NetSim\tcl8.0.5\generic  
-ID:\Lew\keti\ns\NetSim\otcl-1.0a4 
-ID:\Lew\keti\ns\NetSim\tclcl-1.0b9  
-ID:\Lew\keti\ns\NetSim\tk8.0.5\xlib  
-I. -Ie:\micros~1\vc98\include -FotclAppInit.o -Tp tclAppInit.cc
tclAppInit.cc
	link -LIBPATH:e:\micros~1\vc98\lib /NODEFAULTLIB 
/INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO msvcrt.lib oldnames.lib 
kernel32.lib  ws2_32.lib mswsock.lib advapi32.lib -out:ns.exe  
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-mpath.o replicator.o  
classifier-mac.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  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  delay.o snoop.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  
lanRouter.o tfcc.o filter.o pkt-counter.o  Decapsulator.o 
Encapsulator.o  channel.o mac.o ll.o  mac-802_11.o  mac-802_3.o  
mip.o mip-reg.o gridkeeper.o  propagation.o tworayground.o 
antenna.o omni-antenna.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  dsr/dsragent.o dsr/hdr_sr.o 
dsr/mobicache.o dsr/path.o  dsr/requesttable.o dsr/routecache.o  
ns-process.o  rap/raplist.o rap/rap.o rap/media-app.o rap/utilities.o  
fsm.o tcp-abs.o  webcache/mcache.o gen\\version.o gen\\ns_tcl.o 
gen\\ptypes.o  win32.o D:\Lew\keti\ns\NetSim\tclcl-1.0b9\tclcl.lib 
-LIBPATH:D:\Lew\keti\ns\NetSim\otcl-1.0a4 otcl.lib  
-LIBPATH:D:\Lew\keti\ns\NetSim\tk8.0.5\win\Release tk80.lib 
-LIBPATH:D:\Lew\keti\ns\NetSim\tcl8.0.5\win\Release tcl80.lib  
msvcrt.lib oldnames.lib kernel32.lib  ws2_32.lib mswsock.lib 
advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib
LINK : warning LNK4031: no subsystem specified; CONSOLE assumed
trace.o : error LNK2001: unresolved external symbol "public: static int  
hdr_tfrc::offset_" (?offset_@hdr_tfrc@@2HA)
ns.exe : fatal error LNK1120: 1 unresolved externals

i wonder if the static modifier is the cause of the error.
whether the static variable static int offset_ in tfrc.h 
could not be used outside?
how can i resolve it?
thanks in advances!

_____________________________________________
һ·�����㣬��һ��ҲԸ�⣡
--Ϊ��ϲ����֧�ֵ�263�׶����ߣ�http://www.263.net��ͶһƱ��
��ҪͶƱ����http://fsurvey.cnnic.net.cn/survey/index.html��