Friday, December 16, 2011

Re: [ns] Problem compiling ns-2: I can not include "p802.15.4.h"

Hi all 

I found the solution: http://old.nabble.com/Error-while-including-wireless-phy.h-td21661874.html. I think it is an important BUG in ns-2. 

Thanks for the help. 
 
David Rodenas Herráiz

>________________________________
> De: David Rodenas <drodenasherraiz@yahoo.es>
>Para: "ns-users@isi.edu" <ns-users@ISI.EDU>
>Enviado: jueves 15 de diciembre de 2011 20:07
>Asunto: [ns] Problem compiling ns-2: I can not include "p802.15.4.h"
>
>
>Hi all
>
>I am working with ns-2, in particular, with the wpan (IEEE 802.15.4) module. I created a new class (classEnergy) where I need to call some functions from Mac802_15_4 class. To do this, I need to include the "wpan/p802_5_4.h" header but the compiler reports the following:
>
>In file included from ./wpan/p802_15_4phy.h:58,
>                 from ./wpan/p802_15_4mac.h:57,
>                 from wpan/classEnergy.cc:17:
>./mac/wireless-phy.h:121: error: expected identifier before 'r'
>./mac/wireless-phy.h:121: error: expected `}' before 'r'
>./mac/wireless-phy.h:121: error: expected unqualified-id before 'r'
>./mac/wireless-phy.h:123: error: expected unqualified-id before "private"
>./mac/wireless-phy.h:123: error: expected `,' or `;' before "private"
>./mac/wireless-phy.h: In function `EnergyModel* em()':
>./mac/wireless-phy.h:129: error: `node' undeclared (first use this function)
>./mac/wireless-phy.h:129: error: (Each undeclared identifier is reported only once for each function it appears in.)
>./mac/wireless-phy.h: At global scope:
>./mac/wireless-phy.h:131: error: `friend' can only be specified inside a class
>./mac/wireless-phy.h:132: error: expected declaration before '}' token
>In file included from ./wpan/p802_15_4phy.h:58,
>                 from ./wpan/p802_15_4mac.h:57,
>                 from wpan/classEnergy.cc:17:
>./mac/wireless-phy.h:42:1: unterminated #ifndef
>In file included from ./wpan/p802_15_4mac.h:57,
>                 from wpan/classEnergy.cc:17:
>./wpan/p802_15_4phy.h:53:1: unterminated #ifndef
>In file included from wpan/classEnergy.cc:17:
>./wpan/p802_15_4mac.h:53:1: unterminated #ifndef
>make: *** [wpan/classEnergy.o] Error 1
>
>I should note that if I don't include "p802_15_4mac.h", the problem dissapears, but I can't use mac functions( e.g. MCPS_DATA_request()).
>
>I searched this same problem on the Web (google and ns2 help) and I found similar problems (http://www.mail-archive.com/ns-users@isi.edu/msg06434.html), but the solution has not been provided. 
>
>I appreciate all the help possible, because I don't know what to do.
>
>Thanks in advance
>
>David Rodenas Herráiz
>
>
>

No comments:

Post a Comment

Counter

blogger analytics