[ns] Error compile aodv.cc
Normalia Samian
lia.sakinah at gmail.com
Wed Jan 30 06:28:05 PST 2008
*Dear all,
I have a problem compiling the aodv.cc code and hope you can help me out to
solve the problem.
I try to compile the aodv.cc on ns-2.31 but it produces the following error:
*
[root at fsksm aodv]# g++ aodv.cc -o aodv
aodv.cc:35:18: error: aodv.h: No such file or directory
aodv.cc:36:25: error: aodv_packet.h: No such file or directory
aodv.cc:37:20: error: random.h: No such file or directory
aodv.cc:38:23: error: cmu-trace.h: No such file or directory
aodv.cc:59: error: 'hdr_aodv' has not been declared
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:63: error: 'hdr_all_aodv' was not declared in this scope
aodv.cc:64: error: 'hdr_aodv' has not been declared
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:76: 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: At global scope:
aodv.cc:80: error: 'AODV' has not been declared
*My question is, why can't the program find all the *.h files when the
location of the files is already correctly pointed. *
*
Does this problem has anything to do with environment path setting? Or do i
need to do something to incorporate the gcc compiler with ns2 using
Makefile?
This problem has dragged my work since i face the same problem when i run my
own program that need to include the necessary header files (aodv.h,
aodv_packet.h, agent.h & gridkeeper.h).
I've already point the header files to their exact locations but the same
problems still occur involving
other linking files such as cmu-trace.
** The following is my own program that produce the same error when i
compile aodv.cc. *
[root at fsksm friend_code2]# g++ countfriend.cc -o countfriend
countfriend.cc:6:23: error: aodv/aodv.h: No such file or directory
countfriend.cc:7:30: error: aodv/aodv_packet.h: No such file or directory
countfriend.cc:8:19: error: agent.h: No such file or directory
countfriend.cc:9:24: error: gridkeeper.h: No such file or directory
countfriend.cc:11: error: expected class-name before '{' token
countfriend.cc:23: error: expected class-name before '{' token
countfriend.cc:26: error: ISO C++ forbids declaration of 'TclObject' with no
type
countfriend.cc:26: error: expected ';' before '*' token
countfriend.cc:30: error: expected `;' before '}' token
countfriend.cc: In constructor 'CountFriendClass::CountFriendClass()':
countfriend.cc:25: error: class 'CountFriendClass' does not have any field
named 'TclClass'
countfriend.cc: In constructor 'CountFriend::CountFriend()':
countfriend.cc:32: error: class 'CountFriend' does not have any field named
'Agent'
countfriend.cc:32: error: 'PT_AODV' was not declared in this scope
countfriend.cc: In member function 'int CountFriend::command(int, const
char* const*)':
countfriend.cc:97: error: 'TCL_OK' was not declared in this scope
countfriend.cc:100: error: 'Agent' has not been declared
[root at fsksm friend_code2]#
*I really hope anybody could help me out to solve this problem.
Regards,
Normalia*
More information about the Ns-users
mailing list