[Ndn-interest] [Ndn-lib] NDN application compilation error.
Alex Afanasyev
alexander.afanasyev at UCLA.EDU
Thu Apr 30 19:24:16 PDT 2015
Hi Anil,
Good to hear that you figure out the issue. It is a known issue (i.e., the fact that ndn-cxx needs to be included before any other boost library header), but could be a little bit tricky to debug. We will try to make an FAQ question for that soon. Unfortunately, this requirement is a necessary evil to make applications seamlessly work with boost and c++11 routines.
—
Alex
> On May 1, 2015, at 8:22 AM, Anil Jangam <anilj.mailing at gmail.com> wrote:
>
> 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 <mailto: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 <mailto: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.
>
>
>
>
> _______________________________________________
> Ndn-lib mailing list
> Ndn-lib at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-lib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20150501/1195cae0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20150501/1195cae0/attachment.bin>
More information about the Ndn-interest
mailing list