void ns3: something is private within this context error

302 views
Skip to first unread message

traveler5260

unread,
Oct 18, 2021, 4:38:03 PM10/18/21
to ns-3-users
Waf: Entering directory `/home/ubuntu21/ns-allinone-3.30.1/ns-3.30.1/build'
[2321/2367] Compiling scratch/aa.cc
../scratch/aa.cc: In member function ‘void FRP_LrWpanNetDevice::Set_FRP_Node(ns3::Ptr<FRP_Node>)’:
../scratch/aa.cc:166:3: error: ‘void ns3::LrWpanNetDevice::CompleteConfig()’ is private within this context
   CompleteConfig ();
   ^~~~~~~~~~~~~~
In file included from ./ns3/lr-wpan-module.h:18:0,
                 from ../scratch/aa.cc:3:
./ns3/lr-wpan-net-device.h:191:8: note: declared private here
   void CompleteConfig (void);
        ^~~~~~~~~~~~~~
../scratch/aa.cc:166:19: error: ‘void ns3::LrWpanNetDevice::CompleteConfig()’ is private within this context
   CompleteConfig ();
                   ^
In file included from ./ns3/lr-wpan-module.h:18:0,
                 from ../scratch/aa.cc:3:
./ns3/lr-wpan-net-device.h:191:8: note: declared private here
   void CompleteConfig (void);
        ^~~~~~~~~~~~~~
../scratch/aa.cc: In function ‘int main(int, char**)’:
../scratch/aa.cc:542:13: error: ‘double ns3::RangePropagationLossModel::m_range’ is private within this context
  propModel->m_range = range;
             ^~~~~~~
In file included from ../scratch/aa.cc:4:0:
./ns3/propagation-loss-model.h:856:10: note: declared private here
   double m_range; //!< Maximum Transmission Range (meters)
          ^~~~~~~

Waf: Leaving directory `/home/ubuntu21/ns-allinone-3.30.1/ns-3.30.1/build'
Build failed
 -> task in 'aa' failed with exit status 1 (run with -v to display more information)

I met the above error while running the waf. I was using the 3.3.0 version of ns3 and ran the cc file. I'm not sure what the problem is.I think your help will be a great help. 

Thank you for your help

Message has been deleted
Message has been deleted

Tom Henderson

unread,
Oct 18, 2021, 6:49:41 PM10/18/21
to ns-3-...@googlegroups.com
These methods and variables have the 'private' access specifier; only
class member methods and friends of the class can access them directly.
Please consult a reference on C++ (on the topic of access specifiers)
if you need more explanation.

- Tom
Reply all
Reply to author
Forward
0 new messages