LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-19-2015, 09:32 AM   #1
SK33
LQ Newbie
 
Registered: Sep 2015
Posts: 8

Rep: Reputation: Disabled
“undefined reference to `hdr_aodv::offset_'” error in NS 2.35


I am trying to make some improvements on AODV routing protocol using NS 2.35. I have made some changes in aodv.cc and aodv.h file. For making the changes effective, I have made the following three commands from the terminal inside NS 2.35 folder:

1. sudo su

2.make clean

3.make

Now I am having the following error:

trace/cmu-trace.o: In function `CMUTrace::format_aodv(Packet*, int)':
cmu-trace.cc: (.text+0x18b7): undefined reference to `hdr_aodv:: offset_'

What is the solutions of this?

For more clarification I am providing the .cc file link here:

https://drive.google.com/file/d/0B1O...ew?usp=sharing

Last edited by SK33; 11-19-2015 at 10:45 PM.
 
Old 11-19-2015, 01:42 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
AODV.cc and AODV.h : The file names are aodv.cc, aodv.h .

? Why are you running as root = 'sudo su', when you are building ns2 ?
Most convenient setup is /home/<user>/ns2/ns-allinone-2.3x/.
No ns2 root commands are allowed, except 'make install' and 'cp ns-name /usr/local/bin/'.

Files : Your modified aodv.h is missing.

And the changes are missing, i.e. what did you edit, and which line numbers :
The diff command can generate the changes ...
diff -Naur aodv.cc-orig aodv.cc >> changes-aodv.cc.txt
diff -Naur aodv.h-orig aodv.h >> changes-aodv.h.txt


P.S. : Why the tag "ns2 ns234", when the above says ns-2.35 ?
Surplus tags : "linux command", "networking" (The 'ns2' tag will do.)


-

Last edited by knudfl; 11-19-2015 at 01:46 PM.
 
Old 11-19-2015, 10:44 PM   #3
SK33
LQ Newbie
 
Registered: Sep 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
“undefined reference to `hdr_aodv::offset_'” error in NS 2.35

Quote:
Originally Posted by knudfl View Post
AODV.cc and AODV.h : The file names are aodv.cc, aodv.h .

? Why are you running as root = 'sudo su', when you are building ns2 ?
Most convenient setup is /home/<user>/ns2/ns-allinone-2.3x/.
No ns2 root commands are allowed, except 'make install' and 'cp ns-name /usr/local/bin/'.

Files : Your modified aodv.h is missing.

And the changes are missing, i.e. what did you edit, and which line numbers :
The diff command can generate the changes ...
diff -Naur aodv.cc-orig aodv.cc >> changes-aodv.cc.txt
diff -Naur aodv.h-orig aodv.h >> changes-aodv.h.txt


P.S. : Why the tag "ns2 ns234", when the above says ns-2.35 ?
Surplus tags : "linux command", "networking" (The 'ns2' tag will do.)


-
Here is the link of modified aodv.cc and aodv,h files. And The file names are aodv.cc and aodv.h. I had mistakenly written AODV.h and AODV.cc
https://drive.google.com/file/d/0B1O...ew?usp=sharing
 
  


Reply

Tags
linux command, networking, ns2, ns2 ns234, tcl-ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
undefined reference to `hdr_hls::offset_' IrfanQasmi Linux - Newbie 13 11-01-2015 11:40 PM
error in ns2 after make command: undefined reference to `hdr_mcv:: offset_' mary1001 Programming 1 07-27-2014 03:43 AM
undefined reference to error in C++ knobby67 Programming 3 01-19-2008 10:34 PM
undefined reference error ilnli Programming 2 08-02-2007 08:34 PM
undefined reference error Quest101 Programming 3 01-01-2005 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration