Hello guys!
I've tried editting the "log.h" file and tried installing it on different Linux machines (with gcc-7 and gcc-5.5 even gcc-4), but nothing works and this error always occurs.
Could you please help me with this problem? Have you ever met this?
Thanks!
Chirfen
2020/7/15
./ns3/log.h:355:44: error: ambiguous overload for ‘operator<<’ (operand types are ‘ns3::ParameterLogger’ and ‘StaticInformation*’)
- the complete error report:
[ 773/1586] cxx: src/wimax/model/bs-service-flow-manager.cc -> build/src/wimax/model/bs-service-flow-manager.cc.1.o
In file included from ../utils/print-introspected-doxygen.cc:9:
../utils/print-introspected-doxygen.cc: In member function ‘void StaticInformation::DoGather(ns3::TypeId)’:
./ns3/log.h:355:44: error: ambiguous overload for ‘operator<<’ (operand types are ‘ns3::ParameterLogger’ and ‘StaticInformation*’)
355 | ns3::ParameterLogger (std::clog) << parameters; \
../utils/print-introspected-doxygen.cc:269:3: note: in expansion of macro ‘NS_LOG_FUNCTION’
269 | NS_LOG_FUNCTION (this);
| ^~~~~~~~~~~~~~~
./ns3/log.h:442:20: note: candidate: ‘ns3::ParameterLogger& ns3::ParameterLogger::operator<<(T) [with T = StaticInformation*]’
442 | ParameterLogger& operator<< (T param)
| ^~~~~~~~
In file included from /usr/include/c++/9/iostream:39,
from ../utils/print-introspected-doxygen.cc:1:
/usr/include/c++/9/ostream:691:5: note: candidate: ‘typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = ns3::ParameterLogger; _Tp = StaticInformation*; typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type = std::basic_ostream<char>&]’
691 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
Waf: Leaving directory `/home/qi/mptcp-development/build'
Build failed
-> task in 'print-introspected-doxygen' failed (exit status 1):
{task 139711690618512: cxx print-introspected-doxygen.cc -> print-introspected-doxygen.cc.4.o}
['/usr/bin/g++', '-Wall', '-pthread', '-I.', '-I..', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '../utils/print-introspected-doxygen.cc', '-c', '-o', 'utils/print-introspected-doxygen.cc.4.o']