0

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

Dalin Huang
  • 11,212
  • 5
  • 32
  • 49
  • Welcome to [Stack Overflow](http://stackoverflow.com/) ! Please read [How to Ask Question](http://stackoverflow.com/help/how-to-ask) and provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) ! – Saurabh Bhandari Apr 25 '17 at 04:35
  • @jenis shah : Images with text are not appreciated. Don't do, please. → Unreadable text, cannot be copied . ... I guess you know how to copy / paste a text to an empty file. – Knud Larsen Apr 25 '17 at 12:44

2 Answers2

1

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

Jian Song
  • 11
  • 2
0

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++

Knud Larsen
  • 5,753
  • 2
  • 14
  • 19