>Message: 2
>Date: Sun, 1 Nov 2009 02:29:00 +0600
>From: Muneeb Ahmed <[email protected]>
>Subject: [ns] ns 2,29 mobility module installation problem
>To: <[email protected]>
>Message-ID: <[email protected]>
>Content-Type: text/plain; charset="Windows-1252"
>hi
>i encounter the following problem while installing ns2 2.29
mobility module on ubuntu
>mac/mac-802_11.cc: In member function ?void
Mac802_11::update_watch(StatWatch*, double)?:
>mac/mac-802_11.cc:3399: warning: deprecated conversion from string
constant to ?char*?
>mac/mac-802_11.cc:3401: warning: deprecated conversion from string
constant to ?char*?
>mac/mac-802_11.cc:3403: warning: deprecated conversion from string
constant to ?char*?
>mac/mac-802_11.cc:3405: warning: deprecated conversion from string
constant to ?char*?
>mac/mac-802_11.cc: In member function ?void
Mac802_11::update_throughput(ThroughputWatch*, double)?:
>mac/mac-802_11.cc:3442: warning: deprecated conversion from string
constant to ?char*?
>mac/mac-802_11.cc:3444: warning: deprecated conversion from string
constant to ?char*?
>mac/mac-802_11.cc:3446: warning: deprecated conversion from string
constant to ?char*?
>mac/mac-802_11.cc:3448: warning: deprecated conversion from string
constant to ?char*?
>make: *** [mac/mac-802_11.o] Error 1
>tnk...@tnk092-desktop:~/ns-allinone-2.29/ns-2.29$
>kindly reply if any body know the solution to this problem
>Regards
>Muneeb
This is due to the changes in gcc version 4.3.0, which Ubuntu is
probably is using.
Either change to ns-2.34, or read below.
Guray Acar wrote:
> Greetings all.
>
> This is not a question. Recently, we changed our OS to Fedora Core 9.
> The C++ compiler that came with it was gcc version 4.3.0.
> I had some problems with compiling ns-2.33 with this version of gcc.
>
> Apparently, the new version of gcc is less tolerant with some
> programming styles including assigning constant strings to
nonconstant
> char* pointers.
> There were some other errors, too.
>
> To cut it short, if you have similar problems, have a look at this
> website http://www.q2s.ntnu.no/~paquerea/ns.php, which was kindly
> provided by Laurent Paquereau at Norwegian University of Science and
> Technology. Quoted from this website is the following text:
>
> FAQ
> Warnings generated by newest versions of gcc
> Using the newest versions of gcc to compile ns-2 with -Wall triggers
> the following warnings:
> warning: deprecated conversion from string constant to 'char*'
> warning: suggest explicit braces to avoid ambiguous 'else'
> warning: suggest parentheses around && within ||
> warning: suggest parentheses around comparison in operand of &
> warning: 'typedef' was ignored in this declaration
>
> To ignore the first four types of warnings, add -Wno-write-strings -
> Wno-parentheses on line 3903 in configure.
>
> To correct the files causing these warnings, download and apply this
> patch.
This was fixed in ns-2.34.
- Tom
--------------------------------------------------------------------
Dr Guray ACAR
Centre for Communication Systems Research (CCSR),
University of Surrey,
Guildford, Surrey, GU2 7XH, United Kingdom.
http://www.ee.surrey.ac.uk/ccsr
--------------------------------------------------------------------
Dr Guray ACAR
Centre for Communication Systems Research (CCSR),
University of Surrey,
Guildford, Surrey, GU2 7XH, United Kingdom.
Tel.: +44-1483-689123
Fax: +44-1483-686011
http://www.ee.surrey.ac.uk/ccsr