[Ndn-interest] "Function 'bind' could not be resolved".

Junxiao Shi shijunxiao at email.arizona.edu
Mon Apr 20 23:34:11 PDT 2015

Hi antil

Please notice this in the examples:
// correct way to include ndn-cxx headers
// #include <ndn-cxx/face.hpp>
#include "face.hpp"

You need to:

   1. uncomment #include <ndn-cxx/face.hpp>
   2. comment out #include "face.hpp"

The build command for a single .cpp on Ubuntu 12.04 is:
g++ -std=c++0x x.cpp $(pkg-config --cflags --libs libndn-cxx)

Setup your Eclipse project to use this or a similar build command.

Yours, Junxiao

On Mon, Apr 20, 2015 at 1:21 PM, antil janu <antil.janu at gmail.com> wrote:

> Hello,
> I followed the example code given here:
> http://named-data.net/doc/ndn-cxx/current/examples.html. Created
> corresponding src/header files in Eclipse (CDT) environment. Also
> configured the "include" paths so that ndn-cxx and boost headers are
> referenced correctly.
> I get the error from following lines in all three Class(s) files.
>     m_face.expressInterest(interest,
>                                            bind(&Consumer::onData, this,
>  _1, _2),
>                                            bind(&Consumer::onTimeout,
> this, _1));
> The error says - "Function 'bind' could not be resolved".
> How do we fix this problem? These are ndn-cxx example program, but I want
> to build them outside ndn-cxx path. Do I have to write the wscript file for
> this and how?
> Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20150420/2053c6ad/attachment.html>

More information about the Ndn-interest mailing list