LinuxQuestions.org
Visit Jeremy's Blog.
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 12-15-2008, 10:24 AM   #1
shyan
LQ Newbie
 
Registered: Dec 2008
Posts: 14

Rep: Reputation: 0
Question Compilation problems of c++ files in ns-2.33 to generate the object code.


Why I m getting errors like
myaodv.cc:1:27: error: myaodv/myaodv.h: No such file or directory
myaodv.cc:2:30: error: aodv/aodv_packet.h: No such file or directory

even though I have a Makefile?
What are the necessary changes that I have to make so that I can remove the errors? My major problem is that I am not able to compile to get the object code of a c++ file. While compiling it is giving the following errors.
[root@localhost aodv]# g++ -c aodv.cc
In file included from aodv.cc:35:
aodv.h:42:23: error: cmu-trace.h: No such file or directory
aodv.h:43:22: error: priqueue.h: No such file or directory
In file included from aodv.h:44,
from aodv.cc:35:
aodv_rtable.h:38:20: error: config.h: No such file or directory
aodv_rtable.h:39:26: error: lib/bsd-list.h: No such file or directory
aodv_rtable.h:40:23: error: scheduler.h: No such file or directory
In file included from aodv.h:45,
from aodv.cc:35:
aodv_rqueue.h:36:16: error: ip.h: No such file or directory
aodv_rqueue.h:37:19: error: agent.h: No such file or directory
aodv.cc:37:20: error: random.h: No such file or directory
aodv_rtable.h:55: error: ISO C++ forbids declaration of ‘LIST_ENTRY’ with no type
aodv_rtable.h:55: error: expected ‘;’ before ‘nb_link’
aodv_rtable.h:56: error: ‘nsaddr_t’ does not name a type
aodv_rtable.h: In constructor ‘AODV_Neighbor::AODV_Neighbor(u_int32_t)’:
aodv_rtable.h:52: error: ‘nb_addr’ was not declared in this scope
aodv_rtable.h: At global scope:
aodv_rtable.h:60: error: expected constructor, destructor, or type conversion before ‘(’ token
aodv_rtable.h:72: error: ISO C++ forbids declaration of ‘LIST_ENTRY’ with no type
aodv_rtable.h:72: error: expected ‘;’ before ‘pc_link’
aodv_rtable.h:73: error: ‘nsaddr_t’ does not name a type
aodv_rtable.h: In constructor ‘AODV_Precursor::AODV_Precursor(u_int32_t)’:
aodv_rtable.h:69: error: ‘pc_addr’ was not declared in this scope
aodv_rtable.h: At global scope:
aodv_rtable.h:76: error: expected constructor, destructor, or type conversion before ‘(’ token
aodv_rtable.h:93: error: ‘nsaddr_t’ has not been declared
aodv_rtable.h:94: error: expected ‘;’ before ‘(’ token
aodv_rtable.h:96: error: ‘nsaddr_t’ has not been declared
aodv_rtable.h:97: error: expected ‘;’ before ‘(’ token
aodv_rtable.h:98: error: ‘nsaddr_t’ has not been declared
aodv_rtable.h:106: error: ISO C++ forbids declaration of ‘LIST_ENTRY’ with no type
aodv_rtable.h:106: error: expected ‘;’ before ‘rt_link’
aodv_rtable.h:108: error: ‘nsaddr_t’ does not name a type
aodv_rtable.h:113: error: ‘nsaddr_t’ does not name a type
aodv_rtable.h:115: error: ‘aodv_precursors’ does not name a type
aodv_rtable.h:143: error: ‘aodv_ncache’ does not name a type
aodv_rtable.h:157: error: expected ‘;’ before ‘(’ token
aodv_rtable.h:158: error: ‘nsaddr_t’ has not been declared
aodv_rtable.h:159: error: expected ‘;’ before ‘(’ token
aodv_rtable.h:162: error: ‘aodv_rthead’ has not been declared
aodv_rtable.h:162: error: ISO C++ forbids declaration of ‘LIST_HEAD’ with no type
aodv_rtable.h:162: error: expected ‘;’ before ‘rthead’
aodv_rtable.h: In constructor ‘aodv_rtable::aodv_rtable()’:
aodv_rtable.h:153: error: ‘rthead’ was not declared in this scope
aodv_rtable.h:153: error: ‘LIST_INIT’ was not declared in this scope
aodv_rtable.h: In member function ‘aodv_rt_entry* aodv_rtable::head()’:
aodv_rtable.h:155: error: ‘rthead’ was not declared in this scope
aodv_rqueue.h: At global scope:
aodv_rqueue.h:50: error: expected class-name before ‘{’ token
aodv_rqueue.h:54: error: ‘Packet’ has not been declared
aodv_rqueue.h:54: error: ‘Handler’ has not been declared
aodv_rqueue.h:56: error: ‘Packet’ has not been declared
aodv_rqueue.h:64: error: ISO C++ forbids declaration of ‘Packet’ with no type
aodv_rqueue.h:64: error: expected ‘;’ before ‘*’ token
aodv_rqueue.h:69: error: ISO C++ forbids declaration of ‘Packet’ with no type
aodv_rqueue.h:69: error: expected ‘;’ before ‘*’ token
aodv_rqueue.h:73: error: ‘nsaddr_t’ has not been declared
aodv_rqueue.h:76: error: ISO C++ forbids declaration of ‘Packet’ with no type
aodv_rqueue.h:76: error: expected ‘;’ before ‘*’ token
aodv_rqueue.h:78: error: ‘nsaddr_t’ has not been declared
aodv_rqueue.h:78: error: ‘Packet’ has not been declared
aodv_rqueue.h:78: error: ‘Packet’ has not been declared
aodv_rqueue.h:79: error: ‘Packet’ has not been declared
aodv_rqueue.h:79: error: ‘Packet’ has not been declared
aodv_rqueue.h:82: error: ISO C++ forbids declaration of ‘Packet’ with no type
aodv_rqueue.h:82: error: expected ‘;’ before ‘*’ token
aodv_rqueue.h:83: error: ISO C++ forbids declaration of ‘Packet’ with no type
aodv_rqueue.h:83: error: expected ‘;’ before ‘*’ token
aodv_rqueue.h: In member function ‘void aodv_rqueue::recv(int*, int*)’:
aodv_rqueue.h:54: error: ‘abort’ was not declared in this scope
aodv_rqueue.h: In member function ‘int aodv_rqueue::command(int, const char* const*)’:
aodv_rqueue.h:59: error: ‘Connector’ has not been declared
aodv.h: At global scope:
aodv.h:129: error: expected class-name before ‘{’ token
aodv.h:132: error: ‘Event’ has not been declared
aodv.h:135: error: ‘Event’ does not name a type
aodv.h:138: error: expected class-name before ‘{’ token
aodv.h:141: error: ‘Event’ has not been declared
aodv.h:144: error: ‘Event’ does not name a type
aodv.h:147: error: expected class-name before ‘{’ token
aodv.h:150: error: ‘Event’ has not been declared
aodv.h:153: error: ‘Event’ does not name a type
aodv.h:156: error: expected class-name before ‘{’ token
aodv.h:159: error: ‘Event’ has not been declared
aodv.h:162: error: ‘Event’ does not name a type
aodv.h:165: error: expected class-name before ‘{’ token
aodv.h:168: error: ‘Event’ has not been declared
aodv.h:171: error: ‘Event’ does not name a type
aodv.h:181: error: expected `)' before ‘i’
aodv.h:183: error: ISO C++ forbids declaration of ‘LIST_ENTRY’ with no type
aodv.h:183: error: expected ‘;’ before ‘link’
aodv.h:184: error: ‘nsaddr_t’ does not name a type
aodv.h:189: error: expected constructor, destructor, or type conversion before ‘(’ token
aodv.h:195: error: expected class-name before ‘{’ token
aodv.h:209: error: expected `)' before ‘id’
aodv.h:211: error: ‘Packet’ has not been declared
aodv.h:211: error: ‘Handler’ has not been declared
aodv.h:220: error: ‘Packet’ has not been declared
aodv.h:222: error: ‘nsaddr_t’ has not been declared
aodv.h:225: error: ‘Packet’ has not been declared
aodv.h:227: error: ‘Packet’ has not been declared
aodv.h:228: error: ‘nsaddr_t’ has not been declared
aodv.h:232: error: ‘Packet’ has not been declared
aodv.h:233: error: ISO C++ forbids declaration of ‘Packet’ with no type
aodv.h:233: error: expected ‘;’ before ‘*’ token
aodv.h:238: error: ‘nsaddr_t’ has not been declared
aodv.h:239: error: expected ‘;’ before ‘(’ token
aodv.h:240: error: ‘nsaddr_t’ has not been declared
aodv.h:247: error: ‘nsaddr_t’ has not been declared
aodv.h:248: error: ‘nsaddr_t’ has not been declared
aodv.h:256: error: ‘Packet’ has not been declared
aodv.h:259: error: ‘nsaddr_t’ has not been declared
aodv.h:261: error: ‘nsaddr_t’ has not been declared
aodv.h:262: error: ‘nsaddr_t’ has not been declared
aodv.h:264: error: ‘Packet’ has not been declared
aodv.h:269: error: ‘Packet’ has not been declared
aodv.h:270: error: ‘Packet’ has not been declared
aodv.h:271: error: ‘Packet’ has not been declared
aodv.h:272: error: ‘Packet’ has not been declared
aodv.h:273: error: ‘Packet’ has not been declared
aodv.h:282: error: ‘nsaddr_t’ does not name a type
aodv.h:287: error: ‘aodv_ncache’ does not name a type
aodv.h:288: error: ‘aodv_bcache’ does not name a type
aodv.h:313: error: ISO C++ forbids declaration of ‘Trace’ with no type
aodv.h:313: error: expected ‘;’ before ‘*’ token
aodv.h:319: error: ISO C++ forbids declaration of ‘PriQueue’ with no type
aodv.h:319: error: expected ‘;’ before ‘*’ token
aodv.h:324: error: ‘nsaddr_t’ has not been declared
aodv.h:325: error: ‘Packet’ has not been declared
aodv.h:326: error: ‘nsaddr_t’ has not been declared
aodv.h: In member function ‘int AODV::initialized()’:
aodv.h:215: error: ‘target_’ was not declared in this scope
aodv_packet.h: At global scope:
aodv_packet.h:71: error: expected ‘,’ or ‘...’ before ‘*’ token
aodv_packet.h:71: error: ISO C++ forbids declaration of ‘Packet’ with no type
aodv_packet.h: In static member function ‘static hdr_aodv* hdr_aodv::access(int)’:
aodv_packet.h:72: error: ‘p’ was not declared in this scope
aodv_packet.h: At global scope:
aodv_packet.h:82: error: ‘nsaddr_t’ does not name a type
aodv_packet.h:84: error: ‘nsaddr_t’ does not name a type
aodv_packet.h:115: error: ‘nsaddr_t’ does not name a type
aodv_packet.h:117: error: ‘nsaddr_t’ does not name a type
aodv_packet.h:147: error: ‘nsaddr_t’ does not name a type
aodv.cc:60: error: expected class-name before ‘{’ token
aodv.cc: In constructor ‘AODVHeaderClass::AODVHeaderClass()’:
aodv.cc:62: error: class ‘AODVHeaderClass’ does not have any field named ‘PacketHeaderClass’
aodv.cc:64: error: ‘bind_offset’ was not declared in this scope
aodv.cc: At global scope:
aodv.cc:68: error: expected class-name before ‘{’ token
aodv.cc:71: error: ISO C++ forbids declaration of ‘TclObject’ with no type
aodv.cc:71: error: expected ‘;’ before ‘*’ token
aodv.cc:75: error: expected `;' before ‘}’ token
aodv.cc: In constructor ‘AODVclass::AODVclass()’:
aodv.cc:70: error: class ‘AODVclass’ does not have any field named ‘TclClass’
aodv.cc: In member function ‘int AODV::command(int, const char* const*)’:
aodv.cc:81: error: ‘Tcl’ was not declared in this scope
aodv.cc:81: error: ‘tcl’ was not declared in this scope
aodv.cc:81: error: ‘Tcl’ is not a class or namespace
aodv.cc:83: error: ‘strncasecmp’ was not declared in this scope
aodv.cc:84: error: ‘index’ was not declared in this scope
aodv.cc:85: error: ‘TCL_OK’ was not declared in this scope
aodv.cc:88: error: ‘strncasecmp’ was not declared in this scope
aodv.cc:89: error: ‘Event’ was not declared in this scope
aodv.cc:89: error: expected primary-expression before ‘)’ token
aodv.cc:96: error: expected primary-expression before ‘)’ token
aodv.cc:97: error: ‘TCL_OK’ was not declared in this scope
aodv.cc:101: error: ‘strcmp’ was not declared in this scope
aodv.cc:102: error: ‘index’ was not declared in this scope
aodv.cc:102: error: ‘atoi’ was not declared in this scope
aodv.cc:103: error: ‘TCL_OK’ was not declared in this scope
aodv.cc:107: error: ‘logtarget’ was not declared in this scope
aodv.cc:107: error: ‘Trace’ was not declared in this scope
aodv.cc:107: error: expected primary-expression before ‘)’ token
aodv.cc:107: error: expected `;' before ‘TclObject’
aodv.cc:109: error: ‘TCL_ERROR’ was not declared in this scope
aodv.cc:110: error: ‘TCL_OK’ was not declared in this scope
aodv.cc:114: error: ‘TCL_OK’ was not declared in this scope
aodv.cc:115: error: ‘Agent’ has not been declared
aodv.cc:118: error: ‘ifqueue’ was not declared in this scope
aodv.cc:118: error: ‘PriQueue’ was not declared in this scope
aodv.cc:118: error: expected primary-expression before ‘)’ token
aodv.cc:118: error: expected `;' before ‘TclObject’
aodv.cc:121: error: ‘TCL_ERROR’ was not declared in this scope
aodv.cc:122: error: ‘TCL_OK’ was not declared in this scope
aodv.cc:125: error: ‘Agent’ has not been declared
aodv.cc: At global scope:
aodv.cc:132: error: expected `)' before ‘id’
aodv.cc:153: error: variable or field ‘handle’ declared void
aodv.cc:153: error: ‘int BroadcastTimer::handle’ is not a static member of ‘class BroadcastTimer’
aodv.cc:153: error: ‘Event’ was not declared in this scope
aodv.cc:153: error: expected primary-expression before ‘)’ token
aodv.cc:153: error: expected ‘,’ or ‘;’ before ‘{’ token
aodv.cc:159: error: variable or field ‘handle’ declared void
aodv.cc:159: error: ‘int HelloTimer::handle’ is not a static member of ‘class HelloTimer’
aodv.cc:159: error: ‘Event’ was not declared in this scope
aodv.cc:159: error: expected primary-expression before ‘)’ token
aodv.cc:159: error: expected ‘,’ or ‘;’ before ‘{’ token
aodv.cc:168: error: variable or field ‘handle’ declared void
aodv.cc:168: error: ‘int NeighborTimer::handle’ is not a static member of ‘class NeighborTimer’
aodv.cc:168: error: ‘Event’ was not declared in this scope
aodv.cc:168: error: expected primary-expression before ‘)’ token
aodv.cc:168: error: expected ‘,’ or ‘;’ before ‘{’ token
aodv.cc:174: error: variable or field ‘handle’ declared void
aodv.cc:174: error: ‘int RouteCacheTimer::handle’ is not a static member of ‘class RouteCacheTimer’
aodv.cc:174: error: ‘Event’ was not declared in this scope
aodv.cc:174: error: expected primary-expression before ‘)’ token
aodv.cc:174: error: expected ‘,’ or ‘;’ before ‘{’ token
aodv.cc:181: error: variable or field ‘handle’ declared void
aodv.cc:181: error: ‘int LocalRepairTimer::handle’ is not a static member of ‘class LocalRepairTimer’
aodv.cc:181: error: ‘Event’ was not declared in this scope
aodv.cc:181: error: ‘p’ was not declared in this scope
aodv.cc:181: error: expected ‘,’ or ‘;’ before ‘{’ token

This is the error I got when I tried to compile the existing aodv.cc and I guess that making or building the simulator will only work when we have the aodv.o file.
I am using ns-2.33 the latest version but here too I am facing the problem of compiling the files. Because of this I have not been able to move forward in my project work. I don't have other help sources so please suggest me with every possible solutions. I am ready to send my code for compilation checking too.


Also when I tried using the make command the following errors were obtained.
[root@localhost ns-2.33]# make
g++ -c -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/usr/src/ns-allinone-2.33/tclcl-1.19 -I/usr/src/ns-allinone-2.33/otcl -I/usr/src/ns-allinone-2.33/include -I/usr/src/ns-allinone-2.33/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o aodv/aodv.o aodv/aodv.cc
aodv/aodv.cc:35:18: error: aodv.h: No such file or directory
aodv/aodv.cc:36:25: error: aodv_packet.h: No such file or directory
aodv/aodv.cc:59: error: ‘hdr_aodv’ has not been declared
aodv/aodv.cc: In constructor ‘AODVHeaderClass::AODVHeaderClass()’:
aodv/aodv.cc:63: error: ‘hdr_all_aodv’ was not declared in this scope
aodv/aodv.cc:64: error: ‘hdr_aodv’ has not been declared
aodv/aodv.cc: In member function ‘virtual TclObject* AODVclass::create(int, const char* const*)’:
aodv/aodv.cc:73: error: expected type-specifier before ‘AODV’
aodv/aodv.cc:73: error: expected `)' before ‘AODV’
aodv/aodv.cc:73: error: cannot convert ‘int*’ to ‘TclObject*’ in return
aodv/aodv.cc: At global scope:
aodv/aodv.cc:79: error: ‘AODV’ has not been declared
aodv/aodv.cc: In function ‘int command(int, const char* const*)’:
aodv/aodv.cc:89: error: ‘btimer’ was not declared in this scope
aodv/aodv.cc:92: error: ‘htimer’ was not declared in this scope
aodv/aodv.cc:93: error: ‘ntimer’ was not declared in this scope
aodv/aodv.cc:96: error: ‘rtimer’ was not declared in this scope
aodv/aodv.cc:102: error: assignment of function ‘char* index(const char*, int)’
aodv/aodv.cc:102: error: cannot convert ‘int’ to ‘char* ()(const char*, int)throw ()’ in assignment
aodv/aodv.cc:107: error: ‘logtarget’ was not declared in this scope
aodv/aodv.cc:113: error: ‘rqueue’ was not declared in this scope
aodv/aodv.cc:115: error: cannot call member function ‘virtual int Agent::command(int, const char* const*)’ without object
aodv/aodv.cc:118: error: ‘ifqueue’ was not declared in this scope
aodv/aodv.cc:118: error: ‘PriQueue’ was not declared in this scope
aodv/aodv.cc:118: error: expected primary-expression before ‘)’ token
aodv/aodv.cc:118: error: expected `;' before ‘TclObject’
aodv/aodv.cc:125: error: cannot call member function ‘virtual int Agent::command(int, const char* const*)’ without object
aodv/aodv.cc: At global scope:
aodv/aodv.cc:132: error: ‘AODV’ has not been declared
aodv/aodv.cc:132: error: ISO C++ forbids declaration of ‘AODV’ with no type
aodv/aodv.cc: In function ‘int AODV(nsaddr_t)’:
aodv/aodv.cc:132: error: only constructors take base initializers
aodv/aodv.cc:133: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:133: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:133: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:134: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:134: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:137: error: assignment of function ‘char* index(const char*, int)’
aodv/aodv.cc:137: error: cannot convert ‘nsaddr_t’ to ‘char* ()(const char*, int)throw ()’ in assignment
aodv/aodv.cc:138: error: ‘seqno’ was not declared in this scope
aodv/aodv.cc:139: error: ‘bid’ was not declared in this scope
aodv/aodv.cc:141: error: ‘nbhead’ was not declared in this scope
aodv/aodv.cc:142: error: ‘bihead’ was not declared in this scope
aodv/aodv.cc:144: error: ‘logtarget’ was not declared in this scope
aodv/aodv.cc:145: error: ‘ifqueue’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:153: error: ‘BroadcastTimer’ has not been declared
aodv/aodv.cc: In function ‘void handle(Event*)’:
aodv/aodv.cc:154: error: ‘agent’ was not declared in this scope
aodv/aodv.cc:155: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:155: error: ‘intr’ was not declared in this scope
aodv/aodv.cc:155: error: ‘BCAST_ID_SAVE’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:159: error: ‘HelloTimer’ has not been declared
aodv/aodv.cc: In function ‘void handle(Event*)’:
aodv/aodv.cc:159: error: redefinition of ‘void handle(Event*)’
aodv/aodv.cc:153: error: ‘void handle(Event*)’ previously defined here
aodv/aodv.cc:160: error: ‘agent’ was not declared in this scope
aodv/aodv.cc:161: error: ‘MinHelloInterval’ was not declared in this scope
aodv/aodv.cc:162: error: ‘MaxHelloInterval’ was not declared in this scope
aodv/aodv.cc:164: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:164: error: ‘intr’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:168: error: ‘NeighborTimer’ has not been declared
aodv/aodv.cc: In function ‘void handle(Event*)’:
aodv/aodv.cc:168: error: redefinition of ‘void handle(Event*)’
aodv/aodv.cc:153: error: ‘void handle(Event*)’ previously defined here
aodv/aodv.cc:169: error: ‘agent’ was not declared in this scope
aodv/aodv.cc:170: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:170: error: ‘intr’ was not declared in this scope
aodv/aodv.cc:170: error: ‘HELLO_INTERVAL’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:174: error: ‘RouteCacheTimer’ has not been declared
aodv/aodv.cc: In function ‘void handle(Event*)’:
aodv/aodv.cc:174: error: redefinition of ‘void handle(Event*)’
aodv/aodv.cc:153: error: ‘void handle(Event*)’ previously defined here
aodv/aodv.cc:175: error: ‘agent’ was not declared in this scope
aodv/aodv.cc:177: error: invalid use of ‘this’ in non-member function
aodv/aodv.cc:177: error: ‘intr’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:181: error: ‘LocalRepairTimer’ has not been declared
aodv/aodv.cc: In function ‘void handle(Event*)’:
aodv/aodv.cc:181: error: redefinition of ‘void handle(Event*)’
aodv/aodv.cc:153: error: ‘void handle(Event*)’ previously defined here
aodv/aodv.cc:182: error: ‘aodv_rt_entry’ was not declared in this scope
aodv/aodv.cc:182: error: ‘rt’ was not declared in this scope
aodv/aodv.cc:189: error: ‘agent’ was not declared in this scope
aodv/aodv.cc:191: error: ‘RTF_UP’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:215: error: ‘AODV’ is not a class or namespace
aodv/aodv.cc: In function ‘void id_insert(nsaddr_t, u_int32_t)’:
aodv/aodv.cc:216: error: ‘BroadcastID’ was not declared in this scope
aodv/aodv.cc:216: error: ‘b’ was not declared in this scope
aodv/aodv.cc:216: error: expected type-specifier before ‘BroadcastID’
aodv/aodv.cc:216: error: expected `;' before ‘BroadcastID’
aodv/aodv.cc:219: error: ‘BCAST_ID_SAVE’ was not declared in this scope
aodv/aodv.cc:220: error: ‘bihead’ was not declared in this scope
aodv/aodv.cc:220: error: ‘bihead’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:225: error: ‘AODV’ is not a class or namespace
aodv/aodv.cc: In function ‘bool id_lookup(nsaddr_t, u_int32_t)’:
aodv/aodv.cc:226: error: ‘BroadcastID’ was not declared in this scope
aodv/aodv.cc:226: error: ‘b’ was not declared in this scope
aodv/aodv.cc:226: error: ‘bihead’ was not declared in this scope
aodv/aodv.cc: At global scope:
aodv/aodv.cc:237: error: ‘AODV’ is not a class or namespace
aodv/aodv.cc: In function ‘void id_purge()’:
aodv/aodv.cc:238: error: ‘BroadcastID’ was not declared in this scope
aodv/aodv.cc:238: error: ‘b’ was not declared in this scope
aodv/aodv.cc:238: error: ‘bihead’ was not declared in this scope
aodv/aodv.cc:239: error: ‘bn’ was not declared in this scope
aodv/aodv.cc:246: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
aodv/aodv.cc: At global scope:
aodv/aodv.cc:256: error: ‘AODV’ is not a class or namespace
aodv/aodv.cc:256: error: ‘aodv_rt_entry’ was not declared in this scope
aodv/aodv.cc:256: error: ‘rt’ was not declared in this scope
aodv/aodv.cc:256: error: expected ‘,’ or ‘;’ before ‘{’ token
make: *** [aodv/aodv.o] Error 1
[root@localhost ns-2.33]#


Last edited by shyan; 12-15-2008 at 10:45 AM. Reason: New errors
 
Old 12-15-2008, 01:03 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,683

Rep: Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284
1) g++ has no way of knowing the Makefile or all
the includes in ns-2.33 files, all having no path
specified for the 29 different locations.
Those are only available from the Makefile.

2) Having problems running 'make' : Suggest : Delete
'config.status' and 'Makefile' in //ns-2.33 .

Then please do './configure' again ...
And then 'make' (usually no problems at all)

It seems that you have only 27 include path's
shown. May be you should start all over again.
Unpack 'ns-allinone-2.33' to /home/shyan/tmp/ns-all...
This is what /home is meant for. It is not recommended
to run anything as root ( except administration )
....

Last edited by knudfl; 12-15-2008 at 01:18 PM.
 
Old 12-15-2008, 05:35 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,683

Rep: Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284
Quote:
#include <aodv/aodv.h>
#include <aodv/aodv_packet.h>
#include <random.h>
#include <cmu-trace.h>
I just remembered this from the other thread.

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

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

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

Probably an error in your modified code ???
.........
Ref. email from shyan, Dec.18' : Error corrected, problem solved.
....

Last edited by knudfl; 12-18-2008 at 02:36 PM. Reason: ref. email
 
Old 12-13-2010, 11:39 PM   #4
rajesh_ds2@yahoo.co.in
LQ Newbie
 
Registered: Dec 2010
Posts: 8

Rep: Reputation: 0
object does not name a type

aodv_packet.h:82: error: ‘nsaddr_t’ does not name a type please can you let me know how you got around this error.
 
Old 12-14-2010, 07:29 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,985

Rep: Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315Reputation: 4315
Quote:
Originally Posted by rajesh_ds2@yahoo.co.in View Post
aodv_packet.h:82: error: ‘nsaddr_t’ does not name a type please can you let me know how you got around this error.
The error resolution was noted above. And please don't re-open a TWO YEAR OLD thread, and hijack it.
 
  


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
Do we need to have object code in NS2? shyan Linux - Newbie 2 12-25-2008 06:27 AM
How to build object code from c++ file in ns-2.33? shyan Linux - Newbie 1 12-15-2008 06:23 AM
Java: Generate html code Clemente Programming 6 11-26-2006 01:39 PM
Manually load object code into RAM and execute it sto237 Linux - Software 3 01-28-2006 09:05 PM
Loading object code into RAM and running it sto237 Linux - Software 1 01-27-2006 06:46 PM

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

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