Ошибка при установке NS2 на Ubuntu 17.01

При установке ns2 на Ubuntu 17.01 появляется следующая ошибка:

mdart/mdart_adp.cc: In member function ‘void ADP::sendDarq(nsaddr_t, int)’: mdart/mdart_adp.cc:108:21: error: reference to ‘hash’ is ambiguous nsaddr_t dstAdd_ = hash(reqId); ^~~~ 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++/7/bits/basic_string.h:6575:0, from /usr/include/c++/7/string:52, from /usr/include/c++/7/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++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^~~~ 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++/7/bits/basic_string.h:6575:0, from /usr/include/c++/7/string:52, from /usr/include/c++/7/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++/7/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] Errore 1 Ns make failed! See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
0
задан 26 March 2018 в 00:08

2 ответа

'ns-2,35' Ubuntu 17.10: sudo apt install g++-5 → I.e. не позднее g ++ - 5 (> = 5.4). Примечание. У вас может быть столько же версий gcc, сколько вы хотите, установленных одновременно.

tar xvf ns-allinone-2.35_gcc5.tar.gz // 2014 - 2017 update

https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing

cd ns-allinone-2.35/ export CC=gcc-5 CXX=g++-5 && ./install cd ns-2.35/ sudo make install

Если вам нужны дополнительные протоколы → Все ~ 300 патчей → https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing . .. И ~ 2500 симуляций https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing

0
ответ дан 17 July 2018 в 18:06

'ns-2,35' Ubuntu 17.10: sudo apt install g++-5 → I.e. не позднее g ++ - 5 (> = 5.4). Примечание. У вас может быть столько же версий gcc, сколько вы хотите, установленных одновременно.

tar xvf ns-allinone-2.35_gcc5.tar.gz // 2014 - 2017 update

https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing

cd ns-allinone-2.35/ export CC=gcc-5 CXX=g++-5 && ./install cd ns-2.35/ sudo make install

Если вам нужны дополнительные протоколы → Все ~ 300 патчей → https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing . .. И ~ 2500 симуляций https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing

0
ответ дан 23 July 2018 в 18:56

Другие вопросы по тегам:

Похожие вопросы: