<div dir="ltr">Hi,<div><br></div><div>I want to create a new LP packet to exchange geographical information between nodes in order to control the forwarding, but I have difficulties.</div><div><br></div><div>As I described in this thread (<a href="http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2017-July/002545.html">http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2017-July/002545.html</a>), I modified the "lp/fields.hpp", "lp/tags.hpp", and "lp/tlv.hpp" to define the field and tag in the LP packet.</div><div>It compiles without a problem with "./waf" and "sudo ./waf install".</div><div><br></div><div>Then, I go on to encode and decode the Tag in to a LpHeaderField in "NFD/daemon/face/generic-link-service.cpp". When I compile with "./waf" I get the error at the bottom of this email that I don't know how to solve.</div><div><br></div><div>Can you help please?<br></div><div><br></div><div>I'm using NFD and ndn-cxx 0.5.1.</div><div><br></div><div><br></div><div>Thank you</div><div><br></div><div><br></div><div>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div><div>Error message:</div><div><br></div><div>[ 89/158] Compiling daemon/face/generic-link-service.cpp</div><div>In file included from /usr/local/include/ndn-cxx/lp/packet.hpp:25:0,</div><div>                 from ../daemon/face/lp-fragmenter.hpp:31,</div><div>                 from ../daemon/face/generic-link-service.hpp:30,</div><div>                 from ../daemon/face/generic-link-service.cpp:26:</div><div>/usr/local/include/ndn-cxx/lp/fields.hpp:96:19: error: ‘GeoTag’ is not a member of ‘ndn::lp::tlv’</div><div>                   tlv::GeoTag> GeoTagField;</div><div>                   ^</div><div>/usr/local/include/ndn-cxx/lp/fields.hpp:96:19: error: ‘GeoTag’ is not a member of ‘ndn::lp::tlv’</div><div>/usr/local/include/ndn-cxx/lp/fields.hpp:96:30: error: template argument 3 is invalid</div><div>                   tlv::GeoTag> GeoTagField;</div><div>                              ^</div><div>In file included from /usr/local/include/ndn-cxx/lp/field-decl.hpp:25:0,</div><div>                 from /usr/local/include/ndn-cxx/lp/fields.hpp:25,</div><div>                 from /usr/local/include/ndn-cxx/lp/packet.hpp:25,</div><div>                 from ../daemon/face/lp-fragmenter.hpp:31,</div><div>                 from ../daemon/face/generic-link-service.hpp:30,</div><div>                 from ../daemon/face/generic-link-service.cpp:26:</div><div>/usr/local/include/ndn-cxx/lp/field.hpp: In instantiation of ‘struct ndn::lp::Field<int>’:</div><div>/usr/include/boost/concept/detail/has_constraints.hpp:32:62:   required by substitution of ‘template<class Model> boost::concepts::detail::yes boost::concepts::detail::has_constraints_(Model*, boost::concepts::detail::wrap_constraints<Model, (& Model:: constraints)>*) [with Model = ndn::lp::Field<int>]’</div><div>/usr/include/boost/concept/detail/has_constraints.hpp:42:5:   required from ‘const bool boost::concepts::not_satisfied<ndn::lp::Field<int> >::value’</div><div>/usr/include/boost/concept/detail/has_constraints.hpp:45:31:   required from ‘struct boost::concepts::not_satisfied<ndn::lp::Field<int> >’</div><div>/usr/include/boost/mpl/if.hpp:67:11:   required from ‘struct boost::mpl::if_<boost::concepts::not_satisfied<ndn::lp::Field<int> >, boost::concepts::constraint<ndn::lp::Field<int> >, boost::concepts::requirement<boost::concepts::failed************ ndn::lp::Field<int>::************> >’</div><div>/usr/include/boost/concept/detail/general.hpp:50:8:   required from ‘struct boost::concepts::requirement_<void (*)(ndn::lp::Field<int>)>’</div><div>/usr/local/include/ndn-cxx/lp/fields.hpp:97:1:   required from here</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:62:1: error: ‘int’ is not a class, struct, or union type</div><div> {</div><div> ^</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:62:1: error: ‘int’ is not a class, struct, or union type</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:62:1: error: ‘int’ is not a class, struct, or union type</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:62:1: error: ‘int’ is not a class, struct, or union type</div><div>In file included from /usr/include/boost/concept/assert.hpp:35:0,</div><div>                 from /usr/include/boost/concept_check.hpp:20,</div><div>                 from /usr/local/include/ndn-cxx/common.hpp:124,</div><div>                 from /usr/local/include/ndn-cxx/meta-info.hpp:25,</div><div>                 from /usr/local/include/ndn-cxx/data.hpp:25,</div><div>                 from ./../core/common.hpp:59,</div><div>                 from <command-line>:0:</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:66:3: error: ‘int’ is not a class, struct, or union type</div><div>   NDN_CXX_ASSERT_DEFAULT_CONSTRUCTIBLE(typename X::ValueType);</div><div>   ^</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:67:3: error: ‘int’ is not a class, struct, or union type</div><div>   BOOST_CONCEPT_ASSERT((boost::CopyConstructible<typename X::ValueType>));</div><div>   ^</div><div>../daemon/face/generic-link-service.cpp: In member function ‘void nfd::face::GenericLinkService::encodeLpFields(const ndn::TagHost&, ndn::lp::Packet&)’:</div><div>../daemon/face/generic-link-service.cpp:134:42: error: no matching function for call to ‘ndn::lp::Packet::add(ndn::SimpleTag<long unsigned int, 1610612737>&)’</div><div>     lpPacket.add<lp::GeoTagField>(*geoTag);</div><div>                                          ^</div><div>In file included from ../daemon/face/lp-fragmenter.hpp:31:0,</div><div>                 from ../daemon/face/generic-link-service.hpp:30,</div><div>                 from ../daemon/face/generic-link-service.cpp:26:</div><div>/usr/local/include/ndn-cxx/lp/packet.hpp:153:3: note: candidate: template<class FIELD> ndn::lp::Packet& ndn::lp::Packet::add(const typename FIELD::ValueType&)</div><div>   add(const typename FIELD::ValueType& value)</div><div>   ^</div><div>/usr/local/include/ndn-cxx/lp/packet.hpp:153:3: note:   template argument deduction/substitution failed:</div><div>/usr/local/include/ndn-cxx/lp/packet.hpp: In substitution of ‘template<class FIELD> ndn::lp::Packet& ndn::lp::Packet::add(const typename FIELD::ValueType&) [with FIELD = int]’:</div><div>../daemon/face/generic-link-service.cpp:134:42:   required from here</div><div>/usr/local/include/ndn-cxx/lp/packet.hpp:153:3: error: ‘int’ is not a class, struct, or union type</div><div>In file included from /usr/local/include/ndn-cxx/lp/field-decl.hpp:25:0,</div><div>                 from /usr/local/include/ndn-cxx/lp/fields.hpp:25,</div><div>                 from /usr/local/include/ndn-cxx/lp/packet.hpp:25,</div><div>                 from ../daemon/face/lp-fragmenter.hpp:31,</div><div>                 from ../daemon/face/generic-link-service.hpp:30,</div><div>                 from ../daemon/face/generic-link-service.cpp:26:</div><div>/usr/local/include/ndn-cxx/lp/field.hpp: In instantiation of ‘ndn::lp::Field<X>::~Field() [with X = int]’:</div><div>/usr/include/boost/concept/detail/general.hpp:38:28:   required from ‘static void boost::concepts::requirement<boost::concepts::failed************ Model::************>::failed() [with Model = ndn::lp::Field<int>]’</div><div>/usr/local/include/ndn-cxx/lp/fields.hpp:97:1:   required from here</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:72:27: error: ‘int’ is not a class, struct, or union type</div><div>     typename X::ValueType decoded = j.decode(wire);</div><div>                           ^</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:74:5: error: request for member ‘encode’ in ‘j’, which is of non-class type ‘int’</div><div>     j.encode(enc, decoded);</div><div>     ^</div><div>/usr/local/include/ndn-cxx/lp/field.hpp:72:27: error: ‘int’ is not a class, struct, or union type</div><div>     typename X::ValueType decoded = j.decode(wire);</div></div><div><br></div></div>