<div dir="ltr"><div>You forgot to link against the ndn libraries:</div><div><br></div><div>
g++ -std=c++11 test-get-async.cpp -o test-get-async-lLIBRARY</div><div><br></div><div>where library should be something like ndn ndnlib.<br></div></div><br><div class="gmail_quote"><div dir="ltr">Le mer. 19 sept. 2018 à 04:44, Gang Liu <<a href="mailto:16111015@bjtu.edu.cn">16111015@bjtu.edu.cn</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Hi, NDN friends,</p>
<p>I am trying to install and configure the NFD and NDN CCL following the guides: <a href="https://redmine.named-data.net/projects/application-development-documentation-guides/wiki/Step-By-Step_-_Common_Client_Libraries" target="_blank">https://redmine.named-data.net/projects/application-development-documentation-guides/wiki/Step-By-Step_-_Common_Client_Libraries</a></p>
<p>everything seems like ok.</p>
<p><a href="mailto:ubuntu@lg-nfd-experiment:~/ndn-cpp-master$" target="_blank">ubuntu@lg-nfd-experiment:~/ndn-cpp-master$</a> sudo make install<br>Libraries have been installed in:<br>  /usr/local/lib</p>
<p>See any operating system documentation about shared libraries for<br>more information, such as the ld(1) and ld.so(8) manual pages.<br>----------------------------------------------------------------------<br>/bin/mkdir -p '/usr/local/lib/pkgconfig'<br>/usr/bin/install -c -m 644 libndn-cpp.pc '/usr/local/lib/pkgconfig'<br>make[2]: Leaving directory '/home/ubuntu/ndn-cpp-master'<br>make[1]: Leaving directory '/home/ubuntu/ndn-cpp-master</p>
<p><a href="mailto:ubuntu@lg-nfd-experiment:~/ndn-cpp-master$" target="_blank">ubuntu@lg-nfd-experiment:~/ndn-cpp-master$</a> make check<br>============================================================================<br>Testsuite summary for ndn-cpp 0.14<br>============================================================================<br># TOTAL: 43<br># PASS:  43<br># SKIP:  0<br># XFAIL: 0<br># FAIL:  0<br># XPASS: 0<br># ERROR: 0<br>============================================================================<br>make[3]: Leaving directory '/home/ubuntu/ndn-cpp-master'<br>make[2]: Leaving directory '/home/ubuntu/ndn-cpp-master'<br>make[1]: Leaving directory '/home/ubuntu/ndn-cpp-master'</p>
<p> </p>
<p><strong>BUT when I compiled the test demo, I got the following errors:</strong></p>
<p><a href="mailto:ubuntu@lg-nfd-experiment:~/ndn-demo/example$" target="_blank">ubuntu@lg-nfd-experiment:~/ndn-demo/example$</a> g++ -std=c++11 test-get-async.cpp -o test-get-async<br>/tmp/ccp6lPoG.o: In function `main':<br>test-get-async.cpp:(.text+0xe2): undefined reference to `ndn::Face::Face(char const*, unsigned short)'<br>test-get-async.cpp:(.text+0x123): undefined reference to `ndn::Name::toUri[abi:cxx11](bool) const'<br>test-get-async.cpp:(.text+0x168): undefined reference to `ndn::WireFormat::getDefaultWireFormat()'<br>test-get-async.cpp:(.text+0x2b9): undefined reference to `ndn::Name::toUri[abi:cxx11](bool) const'<br>test-get-async.cpp:(.text+0x2fe): undefined reference to `ndn::WireFormat::getDefaultWireFormat()'<br>test-get-async.cpp:(.text+0x45a): undefined reference to `ndn::Name::toUri[abi:cxx11](bool) const'<br>test-get-async.cpp:(.text+0x49f): undefined reference to `ndn::WireFormat::getDefaultWireFormat()'<br>test-get-async.cpp:(.text+0x5c6): undefined reference t
 o `ndn::Face::processEvents()'<br>test-get-async.cpp:(.text+0x60e): undefined reference to `ndn::Face::~Face()'<br>test-get-async.cpp:(.text+0x7b7): undefined reference to `ndn::Face::~Face()'<br>/tmp/ccp6lPoG.o: In function `ndn::Name::Name(char const*)':<br>test-get-async.cpp:(.text._ZN3ndn4NameC2EPKc[_ZN3ndn4NameC5EPKc]+0x38): undefined reference to `ndn::Name::set(char const*)'<br>/tmp/ccp6lPoG.o: In function `Counter::onData(std::shared_ptr<ndn::Interest const> const&, std::shared_ptr<ndn::Data> const&)':<br>test-get-async.cpp:(.text._ZN7Counter6onDataERKSt10shared_ptrIKN3ndn8InterestEERKS0_INS1_4DataEE[_ZN7Counter6onDataERKSt10shared_ptrIKN3ndn8InterestEERKS0_INS1_4DataEE]+0x5a): undefined reference to `ndn::Name::toUri[abi:cxx11](bool) const'<br>/tmp/ccp6lPoG.o: In function `Counter::onTimeout(std::shared_ptr<ndn::Interest const> const&)':<br>test-get-async.cpp:(.text._ZN7Counter9onTimeoutERKSt10shared_ptrIKN3ndn8InterestEE[_ZN7Counter9onTimeoutE
 RKSt10shared_ptrIKN3ndn8InterestEE]+0x56): undefined reference to `ndn::Name::toUri[abi:cxx11](bool) const'<br>collect2: error: ld returned 1 exit status</p>
<p>Anyone has ideals? </p>
<p>Thanks.</p>_______________________________________________<br>
Ndn-interest mailing list<br>
<a href="mailto:Ndn-interest@lists.cs.ucla.edu" target="_blank">Ndn-interest@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest</a><br>
</blockquote></div>