Project

General

Profile

Actions

Bug #1222

closed

ndn-cpp tests don't compile

Added by susmit shannigrahi about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
02/04/2014
Due date:
% Done:

0%

Estimated time:

Description

===============================================
Trying to compile test-publish-async.cpp 
===============================================

edith-cavell:~/ndn-cpp/tests$ g++ test-publish-async.cpp -lndn -I ../include/
In file included from ../include/ndn-cpp/name.hpp:17:0,
                 from ../include/ndn-cpp/interest.hpp:11,
                 from ../include/ndn-cpp/face.hpp:11,
                 from test-publish-async.cpp:12:
../include/ndn-cpp/util/blob.hpp:27:40: error: expected template-name before ‘<’ token
 class Blob : public ptr_lib::shared_ptr<const std::vector<uint8_t> > {
                                        ^
../include/ndn-cpp/util/blob.hpp:27:40: error: expected ‘{’ before ‘<’ token
../include/ndn-cpp/util/blob.hpp:27:40: error: expected unqualified-id before ‘<’ token
test-publish-async.cpp:140:1: error: expected ‘}’ at end of input
 }
 ^

===============================================
Trying to compile test-encode-decode-data.cpp 
===============================================

edith-cavell:~/ndn-cpp/tests$ g++ test-encode-decode-data.cpp -lndn -I ../include/
\In file included from ../include/ndn-cpp/name.hpp:17:0,
                 from ../include/ndn-cpp/data.hpp:11,
                 from test-encode-decode-data.cpp:12:
../include/ndn-cpp/util/blob.hpp:27:40: error: expected template-name before ‘<’ token
 class Blob : public ptr_lib::shared_ptr<const std::vector<uint8_t> > {
                                        ^
../include/ndn-cpp/util/blob.hpp:27:40: error: expected ‘{’ before ‘<’ token
../include/ndn-cpp/util/blob.hpp:27:40: error: expected unqualified-id before ‘<’ token
test-encode-decode-data.cpp:298:1: error: expected ‘}’ at end of input
 }

Files

bug.txt (1.74 KB) bug.txt susmit shannigrahi, 02/04/2014 08:55 AM
Actions #1

Updated by susmit shannigrahi about 11 years ago

Sorry about the fortmatting. Attaching a text file.

Actions #2

Updated by Alex Afanasyev about 11 years ago

We are using markdown format here, so for the code (console output), you could just add 4 spaces in front of each line.

As for your question. This is an effect of library version mismatch. You need first remove all references to the installed ndn-cpp-dev (if you installed from packages or macports, this needs to be removed). After compiling from source and installing, the error should go away.

Actions #3

Updated by susmit shannigrahi about 11 years ago

This is on a machine which does not have ndn-cpp-dev.

Actions #4

Updated by Alex Afanasyev about 11 years ago

  • Project changed from 4 to ndn-cxx

The error is referring to the file that does not exist in the latest ndn-cpp-dev... Are you sure you have the latest version? (http://github.com/named-data/ndn-cpp-dev) ?

Actions #5

Updated by Alex Afanasyev about 11 years ago

  • Description updated (diff)
Actions #6

Updated by Alex Afanasyev about 11 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF