Reputation: 1
I am working on VANET. for that, i need to install NS2 on my fedora 24 system. NS 2 version - ns 2.34 . During the installation process, i followed all the steps of ns 2.34 and made changes in the respective files. But at last, i found an error like the one attached in the screenshot. Error: narrowing conversion of 252 from 'int' to 'char' inside play.xbm
I am unable to solve this error. Please guide me for this. enter image description here
Upvotes: 0
Views: 922
Reputation: 11
I solved the problem.
Refer to:error: narrowing conversion of ‘194’ from ‘int’ to ‘char’ inside { }
Add-funsigned-char
to the L48 of the Makefile
in the /ns-allinone-2.34/nam-1.15
directory
image: the code was added like this
Upvotes: 1
Reputation: 5909
i followed all the steps of ns 2.34
Some old "ns2 tutorials" were valid only for a very short time.
Fedora 24 :
Your compiling errors : g++ version 6.3 is OK with ns-2.34, but patching is required. I.e. ns-2.34 was built for g++ version 4.1.2.
ns234_gcc49.patch https://drive.google.com/file/d/0B7S255p3kFXNZDNyV1BPZHhEY0U/view?usp=sharing
cd ns-allinone-2.34/
patch -p0 < ns234_gcc49.patch
./install
P.S. : ns-allinone-2.34 + ns234_gcc49.patch
was tested OK with two different Fedora 24 : The 64bits version and the 32bits version. ns-allinone-2.34
can of course also be compiled as is / no changes : export CC=gcc34 CXX=g++34 && ./install
Requires : # dnf install compat-gcc-34-c++
Upvotes: 0