[ns] ns-2.33 with gcc version 4.3.0 in Fedora Core 9

Tom Henderson tomh at tomh.org
Thu Jul 16 06:37:16 PDT 2009


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



More information about the Ns-users mailing list