Cygwin 安装 NS2 问题

Cygwin 安装 NS2 问题

我正在尝试在 Windows 10ns2 (ns-allinone-2.35)的帮助下进行安装。我运行但出现错误:cygwin 2.909-32bit./install

    tcp/tcp-fack.cc:302:22: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  302 |         register int found, npacket = 0;
      |                      ^~~~~
tcp/tcp-fack.cc:302:29: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  302 |         register int found, npacket = 0;
      |                             ^~~~~~~
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h: In instantiation of ‘constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = TracedInt]’:
tcp/tcp-fack.cc:87:15:   required from here
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: error: no match for ‘operator<’ (operand types are ‘const TracedInt’ and ‘const TracedInt’)
  259 |       if (__a < __b)
      |           ~~~~^~~~~
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: note: candidate: ‘operator<(int, int)’ (built-in)
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: note:   conversion of argument 2 would be ill-formed:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: error: passing ‘const TracedInt’ as ‘this’ argument discards qualifiers [-fpermissive]
In file included from /home/amin/ns-allinone-2.35/tclcl-1.20/tclcl.h:48,
                 from ./config.h:60,
                 from ./common/ip.h:41,
                 from tcp/tcp-fack.cc:29:
/home/amin/ns-allinone-2.35/tclcl-1.20/tracedvar.h:97:16: note:   in call to ‘TracedInt::operator int()’
   97 |         inline operator int() { return val_; }
      |                ^~~~~~~~
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:64,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_pair.h:489:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)’
  489 |     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_pair.h:489:5: note:   template argument deduction/substitution failed:
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: note:   ‘const TracedInt’ is not derived from ‘const std::pair<_T1, _T2>’
  259 |       if (__a < __b)
      |           ~~~~^~~~~
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:67,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:425:5: note: candidate: ‘template<class _Iterator> constexpr bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)’
  425 |     operator<(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:425:5: note:   template argument deduction/substitution failed:
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: note:   ‘const TracedInt’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  259 |       if (__a < __b)
      |           ~~~~^~~~~
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:67,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:464:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)’
  464 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:464:5: note:   template argument deduction/substitution failed:
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: note:   ‘const TracedInt’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  259 |       if (__a < __b)
      |           ~~~~^~~~~
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:67,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:1557:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)’
 1557 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:1557:5: note:   template argument deduction/substitution failed:
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: note:   ‘const TracedInt’ is not derived from ‘const std::move_iterator<_IteratorL>’
  259 |       if (__a < __b)
      |           ~~~~^~~~~
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:67,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:1613:5: note: candidate: ‘template<class _Iterator> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)’
 1613 |     operator<(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_iterator.h:1613:5: note:   template argument deduction/substitution failed:
In file included from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/specfun.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/cmath:1927,
                 from /usr/lib/gcc/i686-pc-cygwin/11/include/c++/math.h:36,
                 from ./tools/random.h:40,
                 from tcp/tcp-fack.cc:33:
/usr/lib/gcc/i686-pc-cygwin/11/include/c++/bits/stl_algobase.h:259:15: note:   ‘const TracedInt’ is not derived from ‘const std::move_iterator<_IteratorL>’
  259 |       if (__a < __b)
      |           ~~~~^~~~~
make: *** [Makefile:94: tcp/tcp-fack.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

更新:已安装的软件包如下: 在此处输入图片描述

相关内容