LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-17-2014, 04:41 AM   #1
spinya
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Rep: Reputation: Disabled
Compilation problem C++ in NS2.35


#include <aodv/aodv.h>
#include <aodv/aodv_packet.h>
#include <random.h>
#include <cmu-trace.h>


#include <file.h> means system wide, usually /usr/include

#include "file.h" means in the current directory, in
//ns-2.35/...

so any <file.h> not in /usr/include or anywhere else in
the system wide path will not be found.

How can I change the sourcecode to use file.h in ns2.35?

Please help.
 
Old 01-17-2014, 07:40 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
Why change anything ? ns-2.35 works OK as it is.

What are you trying to do ? Adding something ?

The INCLUDES not found in the "current directory" or <system wide>
are defined in the Makefile.in , lines 64 - 75.


-

Last edited by knudfl; 01-17-2014 at 09:33 AM.
 
Old 01-17-2014, 05:13 PM   #3
spinya
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
I need to compile program ,mflood, in ns-2.35.
This is some steps I do.

ubuntu:~/ns-allinone-2.35/ns-2.35/mflood$ls
mflood.cc mflood.h mflood-packet.h ...

ubuntu:~/ns-allinone-2.35/ns-2.35/mflood$gcc -c mflood.cc -o mflood.h
mflood.cc:6:20 fatal error: mflood.h: no such file or directory

When I gedit mflood.cc , to see include file.
#include <mflood.h>

but compiler cannot see it in mflood directory.

I try to add -I./mflood in Makefile.in but not work.

I try to edit #include "mflood.h" but it make any problem with any include files after it.

Regards,

Quote:
Originally Posted by knudfl View Post
Why change anything ? ns-2.35 works OK as it is.

What are you trying to do ? Adding something ?

The INCLUDES not found in the "current directory" or <system wide>
are defined in the Makefile.in , lines 64 - 75.


-
 
Old 01-18-2014, 08:07 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
# 3 .

OK, then please attach the files {mflood.cc mflood.h mflood-packet.h}
as mflood.cc.txt, mflood.h.txt, mflood-packet.h.txt , to a new post.
.. or supply a link to a site with the files.
** Some mflood ns2 files here ..
http://code.google.com/p/txsys/sourc...s2/src/mflood/


** Attachments : The paper clip tool in the 'Advanced Editor'.

-
 
  


Reply


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
NS2: leach-c compilation error eng_mohamed_sc Linux - Software 4 04-08-2015 01:11 AM
NS2: Require eap-sim authentication code for simulation in ns2.24 noamankhatib Linux - Software 0 04-29-2013 12:03 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM

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

All times are GMT -5. The time now is 05:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration