cmu-trace.cc:(28.text+0x4b6): undefined refrence to
hello
i am implementing dv-hop localization algorithm in ns2.34 when i am issuin command 'make' i am getting error: cmu-trace.cc:(28.text+0x4b6): undefined refrence to 'hdr_dvhop::offset_' collect2: ld returned 1 exit status make: ***[ns] Error 1 plz help me soon |
Welcome to LQ.
Looks like one or more errors in your C++ code. Suggest : Upload the code files to e.g. 'Google Docs', and ask here : https://stackoverflow.com/questions/tagged/ns2 |
1 Attachment(s)
which code that i have add in the trace/cmu-trace.cc file ?
the doc which i have followed i have attached plz let me kno if there are errors or mistake ? thanks for yor rep |
the previous error i have solved i include the libraries in the trace/cmu-trace.cc file
#define dvhop/dvhop_packet.h #define dvhop/dvhop.h #define dvhop/dvhop.cc bt now it shows an other error: |
1 Attachment(s)
the previous error i have solved i include the libraries in the trace/cmu-trace.cc file
#define dvhop/dvhop_packet.h #define dvhop/dvhop.h #define dvhop/dvhop.cc bt now it shows an other error: |
Re #5.
Please do not show any text as an image. I guess you know how to copy / paste a text to a new text-file.txt ? * No errors are shown. Please try with Google : Nothing to be done for `all'. ( Means that everything is OK.) - |
sory actually i am new at this i will not upload pic next tym thanks for your rep
i tried google but no solution worked :( and if there is no error then my tcl script should run but it is not running only dv-hop_802_11.tcl other tcl are running smoothly means still the algorithm is not implemented right? or there is any other problem? |
Re #7.
Quote:
One long line with things mixed isn't understandable. - |
my protocol DV-Hop is implemented.
but now its shows error in tcl script: # Generated by Topology Generator for Network Simulator (c) DVHOP set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(ifq) Queue/DropTail/PriQueue ;# interface queue type set val(ll) LL ;# link layer type set val(ant) Antenna/OmniAntenna ;# antenna model set val(ifqlen) 50 ;# max packet in ifq set val(nn) 9 ;# number of mobilenodes set val(rp) DVHOP ;# protocol type set val(x) 1000 ;# X dimension of topography set val(y) 1000 ;# Y dimension of topography set val(stop) 50 ;# simulation period set ns [new Simulator] $ns use-scheduler Heap set tracefd [open dvhop-802-11.tr w] set namtrace [open dvhop-802-11.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namtrace $val(x) $val(y) # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) create-god $val(nn) # configure the nodes $ns node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channel [new $val(chan)] \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF \ for {set i 0} {$i < $val(nn) } { incr i } { //showing error at this line set mnode_($i) [$ns node] $mnode_($i) random-motion 0 } # Position of Anchor 1 $mnode_(0) set X_ 150.00 $mnode_(0) set Y_ 200.00 $mnode_(0) set Z_ 0.0 $mnode_(0) label "Anchor1" # Position of Anchor 2 $mnode_(1) set X_ 480.00 $mnode_(1) set Y_ 500.00 $mnode_(1) set Z_ 0.0 $mnode_(1) label "Anchor2" # Position of Anchor 3 $mnode_(2) set X_ 980.00 $mnode_(2) set Y_ 150.00 $mnode_(2) set Z_ 0.0 $mnode_(2) label "Anchor3" # Position of Node 1 $mnode_(3) set X_ 300.00 $mnode_(3) set Y_ 350.00 $mnode_(3) set Z_ 0.0 # Position of Node 2 $mnode_(4) set X_ 400.00 $mnode_(4) set Y_ 250.00 $mnode_(4) set Z_ 0.0 # Position of Node 3 $mnode_(5) set X_ 520.00 $mnode_(5) set Y_ 300.00 $mnode_(5) set Z_ 0.0 # Position of Node 4 $mnode_(6) set X_ 620.00 $mnode_(6) set Y_ 180.00 $mnode_(6) set Z_ 0.0 # Position of Node 5 $mnode_(7) set X_ 720.00 $mnode_(7) set Y_ 210.00 $mnode_(7) set Z_ 0.0 # Position of Node 6 $mnode_(8) set X_ 920.00 $mnode_(8) set Y_ 230.00 $mnode_(8) set Z_ 0.0 #start sending beacon message $ns at 0.0 "[$mnode_(0) set ragent_] anchor" #start sending beacon message $ns at 0.0 "[$mnode_(1) set ragent_] anchor" #start sending beacon message $ns at 0.0 "[$mnode_(2) set ragent_] anchor" for {set i 0} {$i < $val(nn)} { incr i } { $ns initial_node_pos $mnode_($i) 5 } # Telling nodes when the simulation ends for {set i 0} {$i < $val(nn) } { incr i } { $ns at $val(stop) "$mnode_($i) reset;" } # ending nam and the simulation $ns at $val(stop) "$ns nam-end-wireless $val(stop)" $ns at $val(stop) "stop" $ns at [expr $val(stop) + 0.01] "puts "end simulation"; $ns halt" proc stop {} { global ns tracefd namtrace $ns flush-trace close $tracefd close $namtrace #exec nam dvhop-802-11.nam & } $ns run error at line 47: invoked from within i have mentioned the error line in coments if any one can sole the error plz help me or have any other tcl script for dvhop then plz give me thanks |
All times are GMT -5. The time now is 02:23 PM. |