[ndnSIM] Question of face->GetNode()

Alex Afanasyev alexander.afanasyev at ucla.edu
Tue Jan 1 08:01:38 PST 2013


Just include ns3/node.h in your cc file and it will compile.

---
Alex

On Jan 1, 2013, at 7:11 AM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:

> Dear all,
> 	I am trying to print node of the face in ndn-fib-entry.cc: Entry::UpdateStatus(Ptr<Face> face, FaceMetric::Staus status).
> 	I add one line face->GetNode()->GetId() then it gives me error:
> Waf: Entering directory `/Users/shock/ndnSIM/ns-3/build'
> [ 980/1887] cxx: src/ndnSIM/model/fw/green-yellow-red.cc -> build/src/ndnSIM/model/fw/green-yellow-red.cc.1.o
> [ 982/1887] cxx: src/ndnSIM/model/fib/ndn-fib-entry.cc -> build/src/ndnSIM/model/fib/ndn-fib-entry.cc.1.o
> ../src/ndnSIM/model/fib/ndn-fib-entry.cc: In member function 'void ns3::ndn::fib::Entry::UpdateStatus(ns3::Ptr<ns3::ndn::Face>, ns3::ndn::fib::FaceMetric::Status)':
> ../src/ndnSIM/model/fib/ndn-fib-entry.cc:94: error: invalid use of incomplete type 'struct ns3::Node'
> ./ns3/ndn-face.h:37: error: forward declaration of 'struct ns3::Node'
> ./ns3/ptr.h: In destructor 'ns3::Ptr<T>::~Ptr() [with T = ns3::Node]':
> ../src/ndnSIM/model/fib/ndn-fib-entry.cc:94:   instantiated from here
> ./ns3/ptr.h:456: error: invalid use of incomplete type 'struct ns3::Node'
> ./ns3/ndn-face.h:37: error: forward declaration of 'struct ns3::Node'
> Waf: Leaving directory `/Users/shock/ndnSIM/ns-3/build'
> Build failed
>  -> task in 'ns3-ndnSIM' failed (exit status 1): 
> 	{task 4330998224: cxx ndn-fib-entry.cc -> ndn-fib-entry.cc.1.o}
> 
> I am very confused, any one can give hints? Thank you in advance.
> thanks
> 
> My Regards,
> Xiaoke Jiang (蒋小可)
> 
> Ph.D Candidate,
> Dept. of Computer Science and Technology,
> Tsinghua University, P. R. China
> 
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130101/e48ffa14/attachment.html>


More information about the ndnSIM mailing list