Daniel Henrique Joppi wrote:
> anybody?
> 
> On Thu, Sep 4, 2008 at 10:12 PM, Daniel Henrique Joppi <
> [EMAIL PROTECTED]> wrote:
> 
>> Help...
>>
>> I have changed to get rid of "inline" keywords but the errors are
>> persisting...
>>
>> ---------------------------------------------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------------------------------------------------
>> In file included from ./trace/trace.h:43,
>>                  from ./trace/cmu-trace.h:42,
>>                  from aodvg/aodvg_rqueue.cc:33:
>> ./common/packet.h: In static member function 'static void
>> p_info::initName()':
>> ./common/packet.h:273: warning: deprecated conversion from string constant
>> to 'char*'

<snip>

>> ./common/packet.h:368: warning: deprecated conversion from string constant
>> to 'char*'

Daniel,

To avoid all of these warnings, try adding the gcc option 
-Wno-write-strings to your ns-2 Makefile; e.g.

CCOPT   = -g -Wall -Wno-write-strings

The above fixed the problem for me for gcc-4.3.2 machines.


>> -L/home/norxs/ns-allinone-2.33/tclcl-1.19 -ltclcl
>> -L/home/norxs/ns-allinone-2.33/otcl-1.13 -lotcl
>> -L/home/norxs/ns-allinone-2.33/lib -ltk8.4
>> -L/home/norxs/ns-allinone-2.33/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm -lm
>> trace/cmu-trace.o: In function `hdr_aodvg::access(Packet const*)':
>> cmu-trace.cc:(.text._ZN9hdr_aodvg6accessEPK6Packet[hdr_aodvg::access(Packet
>> const*)]+0x7): undefined reference to `hdr_aodvg::offset_'
>> collect2: ld returned 1 exit status
>> make: ** [ns] Erro 1
>>
>> ---------------------------------------------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------------------------------------------------
>> #in /home/norxs/ns-allinone-2.33/ns-2.33/aodvg/aodvg_packet.h
>> struct hdr_aodvg {
>>     u_int8_t ah_type;
>>     /*
>>      u_int8_t        ah_reserved[2];
>>      u_int8_t        ah_hopcount;
>>      */
>>     // Header access methods
>>     static int offset_; // required by PacketHeaderManager
>>     inline static int& offset() {
>>         return offset_;
>>     }
>>     inline static hdr_aodvg* access(const Packet* p) {
>>         return (hdr_aodvg*) p->access(offset_);
>>     }
>> };
>>
>>
> 

As for this error, do you have a line like this?

trace/cmu-trace.cc:#include <aodv/aodvg_packet.h>

Tom

Reply via email to