ns 2 .35 instalação no Ubuntu 16.04

0

Durante a instalação, recebo este erro. Alguém pode sugerir uma solução?

            ^~~~
mdart/mdart_adp.cc: In member function ‘void ADP::sendDaup()’:
mdart/mdart_adp.cc:396:21: error: reference to ‘hash’ is ambiguous
  nsaddr_t dstAdd_ = hash(mdart_->id_);
                     ^~~~
In file included from ./mdart/mdart.h:52:0,
                 from ./mdart/mdart_adp.h:51,
                 from mdart/mdart_adp.cc:47:
./mdart/mdart_function.h:230:17: note: candidates are: nsaddr_t hash(nsaddr_t)
 inline nsaddr_t hash(nsaddr_t id) {
                 ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5628:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bitset:47,
                 from ./mdart/mdart_function.h:62,
                 from ./mdart/mdart.h:52,
                 from ./mdart/mdart_adp.h:51,
                 from mdart/mdart_adp.cc:47:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
Makefile:93: recipe for target 'mdart/mdart_adp.o' failed
make: *** [mdart/mdart_adp.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
    
por dev 17.05.2017 / 07:01

1 resposta

0

Primeiro: use o link ns-allinone-2.35_gcc482.tar.gz link atualizado em outubro de 2014. o ano de 2011 ns-allinone-2.35.tar.gz é para g ++ - 4.4.

O Ubuntu g ++ - 6 não está funcionando com o ns2. Por favor, faça: $ sudo apt install g++-4.9 (Ocasionalmente também vimos problemas com o Ubuntu g ++ - 5.)

E, em seguida, use este comando de compilação: $ export CC=gcc-4.9 CXX=g++-4.9 && ./install

    
por Knud Larsen 17.05.2017 / 14:20