I have a program edited in Vs 2008 using some libraries such as Qt and Point Cloud Library (PCL).
PCL has a 3rd party library which contains boost.
However, some errors appeared after compiling:
1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/sequenced_index.hpp(926) : error C3083: 'Q_FOREACH': the symbol to the left of a '::' must be a type 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/sequenced_index.hpp(926) : error C2039: 'tag' : is not a member of 'boost' 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/sequenced_index.hpp(926) : error C2061: syntax error : identifier 'tag' 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/ordered_index.hpp(1399) : error C3083: 'Q_FOREACH': the symbol to the left of a '::' must be a type 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/ordered_index.hpp(1399) : error C2039: 'tag' : is not a member of 'boost' 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/ordered_index.hpp(1399) : error C2061: syntax error : identifier 'tag' 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/hashed_index.hpp(1254) : error C3083: 'Q_FOREACH': the symbol to the left of a '::' must be a type 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/hashed_index.hpp(1254) : error C2039: 'tag' : is not a member of 'boost' 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/hashed_index.hpp(1254) : error C2061: syntax error : identifier 'tag' 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/random_access_index.hpp(1012) : error C3083: 'Q_FOREACH': the symbol to the left of a '::' must be a type 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/random_access_index.hpp(1012) : error C2039: 'tag' : is not a member of 'boost' 1>C:\Program Files\PCL 1.5.1\3rdParty\Boost\include\boost/multi_index/random_access_index.hpp(1012) : error C2061: syntax error : identifier 'tag'
For the first problem, the error location in the source file is:
template<typename SuperMeta,typename TagList>
inline boost::mpl::true_* boost_foreach_is_noncopyable(
boost::multi_index::detail::random_access_index<SuperMeta,TagList>*&,
boost::foreach::tag) // <-------------error here for the first compile error.
{
return 0;
}
I think maybe this indicates that the Q_FOREACH
conflicts with the boost foreach.
But I do not know how to solve this problem?