Hi, I'm using ns-2.29. When I include a file wireless-phy.h in AODV for certain modifications, it results in following error: [r...@localhost ns-2.29]# 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_11 -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/usr/local/ns-allinone-2.29/tclcl-1.17 -I/usr/local/ns-allinone-2.29/otcl-1.11 -I/usr/local/ns-allinone-2.29/include -I/usr/local/ns-allinone-2.29/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 mobile/tworayground.o mobile/tworayground.cc g++ -c -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_11 -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/usr/local/ns-allinone-2.29/tclcl-1.17 -I/usr/local/ns-allinone-2.29/otcl-1.11 -I/usr/local/ns-allinone-2.29/include -I/usr/local/ns-allinone-2.29/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 ./mac/wireless-phy.h:129: error: expected identifier before 'r' ./mac/wireless-phy.h:129: error: expected `}' before 'r' ./mac/wireless-phy.h:129: error: expected unqualified-id before 'r' ./mac/wireless-phy.h: In member function bool& WirelessPhy::Is_node_on(): ./mac/wireless-phy.h:97: error: node_on_ was not declared in this scope ./mac/wireless-phy.h: In member function bool WirelessPhy::Is_sleeping(): ./mac/wireless-phy.h:98: error: status_ was not declared in this scope ./mac/wireless-phy.h: At global scope: ./mac/wireless-phy.h:131: error: no matching function for call to Sleep_Timer::Sleep_Timer() ./mac/wireless-phy.h:58: note: candidates are: Sleep_Timer::Sleep_Timer(WirelessPhy*) ./mac/wireless-phy.h:56: note: Sleep_Timer::Sleep_Timer(const Sleep_Timer&) ./mac/wireless-phy.h:134: error: expected unqualified-id before private ./mac/wireless-phy.h: In function EnergyModel* em(): ./mac/wireless-phy.h:142: error: node was not declared in this scope ./mac/wireless-phy.h: At global scope: ./mac/wireless-phy.h:144: error: friend can only be specified inside a class ./mac/wireless-phy.h:146: error: expected declaration before } token make: *** [aodv/aodv.o] Error 1
I have checked the code many times but still unable to figure out from where the error creeped in. Kindly help. Regards Amita
