LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-25-2017, 10:29 PM   #1
khanhcn
LQ Newbie
 
Registered: Sep 2017
Posts: 8

Rep: Reputation: Disabled
NS2 - How to build to some .o files without reinstalling NS2


Hi all,

I copied one new folder including some .cc files. I would like to build some .o files without reinstalling NS2.

Have you got any ways?

Thanks,

Khanh CN
 
Old 09-27-2017, 01:34 AM   #2
khanhcn
LQ Newbie
 
Registered: Sep 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
I have found the answer by using combination of command on Terminal:
Code:
./configure
make clean
make
You can refer to below link for more details.
http://2bytes4u.blogspot.com/2012/11/adding-new-module-and-recompiling-ns2.html


However, I encounter another problem. I have copied some library files from author on Internet with his manual.

I suppose, files are 2.h, 2.cc. There are some files inside abc folder are 1.h, 1.cc, 1.o. In his manual, he instructs copying 2.h, 2.cc into folder abc in ns-2.5 and edit file makefile.in by adding 2.o \ . He do not mention to rebuild files to create new 2.o files.

When I have copied 2.h, 2.cc and use above combination of command, Terminal run with error when compile 2.cc

So, if I simulate .tcl file with reference some functions in 2.cc, the simulation can run properly or not???

Last edited by khanhcn; 09-27-2017 at 01:45 AM. Reason: editing
 
Old 10-07-2017, 09:23 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,430

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Code:
I have copied some library files from author on Internet with his manual.

I suppose, files are 2.h, 2.cc. There are some files inside abc folder are 1.h, 1.cc, 1.o. In his manual, he instructs copying 2.h, 2.cc
Not library files, but C++ source code.


Please show a link to the {2.cc, 2.h} files / the mentioned "manual".


-
 
Old 10-15-2017, 08:53 PM   #4
khanhcn
LQ Newbie
 
Registered: Sep 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi @knudfl

May I have your email, my email is cnkhanh(a)gmail.com

I will send files via email.

Thanks
 
  


Reply

Tags
ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Detection of sybil attack in wireless sensor network in ns2. I need help to simulate it in ns2 Miralimk Linux - Software 1 02-22-2016 12:36 PM
NS2: How to set idle(sleeping) time to a node in wireless network in ns2 pon Linux - Newbie 0 08-19-2014 06:45 PM
NS2: Require eap-sim authentication code for simulation in ns2.24 noamankhatib Linux - Software 0 04-29-2013 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:12 AM.

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