LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-11-2011, 07:01 AM   #1
tootz
Member
 
Registered: Feb 2011
Posts: 47

Rep: Reputation: 1
how to link tcl file and C++ files together and run in ns2?


hi,

if i have a tcl file and c++ file, how can i compile them n run them in ns2?

anyone please help?urgent.
 
Old 02-11-2011, 11:31 AM   #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
Tcl is a scripting language. No compiling. Files are run by an interpreter,
in ns2 the binary 'ns' is used : 'ns file.tcl'

The usual method is to add the new object to a copy of the 'Makefile'.
Example abcd.cpp : Then add abcd.o to "Makefile.new", section "OBJ_CC =".
( Assume a backup for Makefile ( like Makefile.org ) and ns
( Rename ns to e.g. ns233 )).

Next : make clean && make -f Makefile.new .
Like the example, you already know : http://elmurod.net/wps/?p=157

Another example : http://www.lrc.ic.unicamp.br/wimax_ns2/
Please look for "Installation".

..
 
Old 12-19-2011, 12:26 AM   #3
amayamoah
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Rep: Reputation: Disabled
how to link tcl file and C++ files together and run in ns2?

Hello Knudfl..
i am Ama and i m very new to this group and ns2 in general. I have a c++ script from crypto++. It runs well. Now, i would want to call this .cpp file in an ns-2 tcl file. I read your reply to a similar question but cant really get it. can u please explain further and in a way that a new person like me can understand. Especially with the Makefile aspect.
Thanks in advance...
 
Old 07-25-2012, 03:42 PM   #4
manolin
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
c tcl linkage

Hi everyone!

how can i get a variable's value in c from tcl, i've already tried binding in vain!
i want to pass a value from one agent to another gotta get that value in tcl and then send it to the
other agent.
it'll help too if u tell me out to get a header's field's value from an agent in tcl.

pls help me out thanks.
 
  


Reply



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
script tcl NS2 MounaRM Linux - Networking 0 01-10-2011 08:49 AM
where to place my tcl scripts for ns2 to see them ? alinnic1 Linux - Software 2 10-14-2010 10:58 AM
Attaching an algorithm to tcl script in ns2 raviteja99 Linux - Wireless Networking 2 09-12-2010 07:16 PM
URGENT- Having problems with tcl,ns2 in cygwin ritoban87 Linux - Newbie 2 01-22-2010 07:07 AM
Can't install NS2 on FC4 - Tcl make eror skyeman Linux - Software 1 08-24-2005 03:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:07 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