Bugzilla – Bug 597
Ns-3 code under MingWin doesn't compile
Last modified: 2009-06-19 10:56:10 UTC
The compilation fails with this error: ..\src\internet-stack\ipv4-raw-socket-impl.cc: In member function `virtual int ns3::Ipv4RawSocketImpl::SendTo(ns3::Ptr<ns3::Packet>, uint32_t, const ns3::Address&)': ..\src\internet-stack\ipv4-raw-socket-impl.cc:177: error: function `ns3::Socket::SocketErrno* ns3::_errno()' is initialized like a variable 'c:\\msys\\1.0\\home\\mathieu\\buildslave\\full-mingw-g++\\build\\bindings\\python\\ns3\\__init__.py' -> 'c:\\msys\\1.0\\home\\mathieu\\buildslave\\full-mingw-g++\\build\\build\\debug\\bindings\\python\\ns3\\__init__.py' Waf: Leaving directory `c:\msys\1.0\home\mathieu\buildslave\full-mingw-g++\build\build' Build failed -> task failed (err #1): {task: cxx ipv4-raw-socket-impl.cc -> ipv4-raw-socket-impl_1.o}
The code was redefining the standard variable errno by using for example Socket::SocketErrno errno; renaming errno to errno_ solved the problem. Changeset 4567:32ca321e4fe7 Regards