[Ndn-interest] Install NFD and NDN CCL

César A. Bernardini mesarpe at gmail.com
Tue Sep 18 23:33:49 PDT 2018


You forgot to link against the ndn libraries:

g++ -std=c++11 test-get-async.cpp -o test-get-async-lLIBRARY

where library should be something like ndn ndnlib.

Le mer. 19 sept. 2018 à 04:44, Gang Liu <16111015 at bjtu.edu.cn> a écrit :

> Hi, NDN friends,
>
> I am trying to install and configure the NFD and NDN CCL following the
> guides:
> https://redmine.named-data.net/projects/application-development-documentation-guides/wiki/Step-By-Step_-_Common_Client_Libraries
>
> everything seems like ok.
>
> ubuntu at lg-nfd-experiment:~/ndn-cpp-master$ sudo make install
> Libraries have been installed in:
>   /usr/local/lib
>
> See any operating system documentation about shared libraries for
> more information, such as the ld(1) and ld.so(8) manual pages.
> ----------------------------------------------------------------------
> /bin/mkdir -p '/usr/local/lib/pkgconfig'
> /usr/bin/install -c -m 644 libndn-cpp.pc '/usr/local/lib/pkgconfig'
> make[2]: Leaving directory '/home/ubuntu/ndn-cpp-master'
> make[1]: Leaving directory '/home/ubuntu/ndn-cpp-master
>
> ubuntu at lg-nfd-experiment:~/ndn-cpp-master$ make check
>
> ============================================================================
> Testsuite summary for ndn-cpp 0.14
>
> ============================================================================
> # TOTAL: 43
> # PASS:  43
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  0
> # XPASS: 0
> # ERROR: 0
>
> ============================================================================
> make[3]: Leaving directory '/home/ubuntu/ndn-cpp-master'
> make[2]: Leaving directory '/home/ubuntu/ndn-cpp-master'
> make[1]: Leaving directory '/home/ubuntu/ndn-cpp-master'
>
>
>
> *BUT when I compiled the test demo, I got the following errors:*
>
> ubuntu at lg-nfd-experiment:~/ndn-demo/example$ g++ -std=c++11
> test-get-async.cpp -o test-get-async
> /tmp/ccp6lPoG.o: In function `main':
> test-get-async.cpp:(.text+0xe2): undefined reference to
> `ndn::Face::Face(char const*, unsigned short)'
> test-get-async.cpp:(.text+0x123): undefined reference to
> `ndn::Name::toUri[abi:cxx11](bool) const'
> test-get-async.cpp:(.text+0x168): undefined reference to
> `ndn::WireFormat::getDefaultWireFormat()'
> test-get-async.cpp:(.text+0x2b9): undefined reference to
> `ndn::Name::toUri[abi:cxx11](bool) const'
> test-get-async.cpp:(.text+0x2fe): undefined reference to
> `ndn::WireFormat::getDefaultWireFormat()'
> test-get-async.cpp:(.text+0x45a): undefined reference to
> `ndn::Name::toUri[abi:cxx11](bool) const'
> test-get-async.cpp:(.text+0x49f): undefined reference to
> `ndn::WireFormat::getDefaultWireFormat()'
> test-get-async.cpp:(.text+0x5c6): undefined reference t o
> `ndn::Face::processEvents()'
> test-get-async.cpp:(.text+0x60e): undefined reference to
> `ndn::Face::~Face()'
> test-get-async.cpp:(.text+0x7b7): undefined reference to
> `ndn::Face::~Face()'
> /tmp/ccp6lPoG.o: In function `ndn::Name::Name(char const*)':
> test-get-async.cpp:(.text._ZN3ndn4NameC2EPKc[_ZN3ndn4NameC5EPKc]+0x38):
> undefined reference to `ndn::Name::set(char const*)'
> /tmp/ccp6lPoG.o: In function
> `Counter::onData(std::shared_ptr<ndn::Interest const> const&,
> std::shared_ptr<ndn::Data> const&)':
> test-get-async.cpp:(.text._ZN7Counter6onDataERKSt10shared_ptrIKN3ndn8InterestEERKS0_INS1_4DataEE[_ZN7Counter6onDataERKSt10shared_ptrIKN3ndn8InterestEERKS0_INS1_4DataEE]+0x5a):
> undefined reference to `ndn::Name::toUri[abi:cxx11](bool) const'
> /tmp/ccp6lPoG.o: In function
> `Counter::onTimeout(std::shared_ptr<ndn::Interest const> const&)':
> test-get-async.cpp:(.text._ZN7Counter9onTimeoutERKSt10shared_ptrIKN3ndn8InterestEE[_ZN7Counter9onTimeoutE
> RKSt10shared_ptrIKN3ndn8InterestEE]+0x56): undefined reference to
> `ndn::Name::toUri[abi:cxx11](bool) const'
> collect2: error: ld returned 1 exit status
>
> Anyone has ideals?
>
> Thanks.
> _______________________________________________
> Ndn-interest mailing list
> Ndn-interest at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20180919/177ee1f7/attachment-0001.html>


More information about the Ndn-interest mailing list