LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-11-2017, 02:25 PM   #1
baig7070
LQ Newbie
 
Registered: Nov 2016
Posts: 6

Rep: Reputation: Disabled
incorporating a c++ module with NS2 tcl file


Hi everybody,
I am trying to incorporate a new C++ module with NS2 tcl file and i am getting an error of multiple mains. I have my main c++ file which runs my desired code using my .cpp file and .h files. When I tried to incorporate it with tcl file in makefile.in, i got the multiple main error in monolithic.cc file. If I dont add my main file and the incorporation takes place.But without my main file of c++, the incorporating is useless to me.
Can anyone can guide me how to fix this error. The error is shown in the attachment.
I ll be obliged!
Attached Thumbnails
Click image for larger version

Name:	12.PNG
Views:	21
Size:	92.8 KB
ID:	24465  
 
Old 03-14-2017, 08:06 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Hi Baig,

If it's a 'module' then you'll probably leverage it as an #include which doesn't need a main. Take a look at some of your other header files, what you are normally using from them are the methods and classes they contain. Think of the new c++ module as an extension of the tcl.cpp, not a separate app that passes data back and forth with the tcl app ( 'cause it doesn't do that). It only gets compiled as part of the tcl.cpp, not as a separate new_module.cpp.

Hope that helps


Last edited by dijetlo; 03-14-2017 at 08:08 AM.
 
  


Reply

Tags
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
a tcl file that run RWP in ns2 Alkindi Linux - Newbie 3 06-30-2016 11:21 AM
[SOLVED] error while executing a tcl file in ns2 Zahraa Ayad Linux - General 3 12-24-2014 10:20 AM
how to pass an argument from .cc file to tcl file in ns2 pon Linux - Newbie 0 12-11-2014 08:44 AM
aomdv.tcl file 4 ns2.34 puru45 Linux - Newbie 2 11-20-2014 08:06 PM

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

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