[Ndn-lib] NDN application compilation error.

Anil Jangam anilj.mailing at gmail.com
Thu Apr 30 17:22:49 PDT 2015


I figured out that this was the problem.

// boost needs to be included after ndn-cxx, otherwise there will be
conflict with _1, _2, ...

/anil.

On Thu, Apr 30, 2015 at 3:20 PM, Anil Jangam <anilj.mailing at gmail.com>
wrote:

> Can someone comment why this error coming?
>
>
>
> This error is coming from all these lines.. (119 to 127).
>
> 106 // Bug 2109 workaround
> 107 using namespace std::placeholders;
> 108 #define BOOST_BIND_NO_PLACEHOLDERS
> 109 #include <boost/is_placeholder.hpp>
> 110 namespace boost {
> 111 #define NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(N)
> \
> 112   template<> \
> 113   struct is_placeholder<typename
> std::remove_const<decltype(_##N)>::type> \
> 114   { \
> 115     enum _vt { \
> 116       value = N \
> 117     }; \
> 118   };
> 119 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(1)
> 120 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(2)
> 121 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(3)
> 122 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(4)
> 123 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(5)
> 124 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(6)
> 125 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(7)
> 126 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(8)
> 127 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(9)
> 128 #undef NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER
> 129 } // namespace boost
> 130
>
>
> Is this some new fix added? What my application has to do with this change
> since there are no compile errors in the application code.
>
> /anil.
>
>
> On Thu, Apr 30, 2015 at 2:58 PM, Anil Jangam <anilj.mailing at gmail.com>
> wrote:
>
>> I am hitting this compilation error..
>>
>> [8/19] Compiling ../src/main.cpp
>> In file included from /usr/local/include/ndn-cxx/face.hpp:27:0,
>>                  from
>> /home/ndnusr1/sandbox/ndnProducer/src/producer.hpp:12,
>>                  from ../src/config/conf-file-proc.hpp:16,
>>                  from ../src/main.cpp:8:
>> /usr/local/include/ndn-cxx/common.hpp:119:1: error: template argument 1
>> is invalid
>>  NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(1)
>>  ^
>> /usr/local/include/ndn-cxx/common.hpp:119:1: error: expected ‘(’ before
>> ‘>’ token
>>  NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(1)
>>  ^
>> /usr/local/include/ndn-cxx/common.hpp:119:1: error: template argument 1
>> is invalid
>> /usr/local/include/ndn-cxx/common.hpp:119:1: error: expected ‘::’ before
>> ‘{’ token
>>  NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(1)
>>
>>
>> What could be the reason for this error?
>>
>> /anil.
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-lib/attachments/20150430/0bee84af/attachment.html>


More information about the Ndn-lib mailing list