Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with PCL version vs C++ version #5

Open
BavanthaU opened this issue Mar 3, 2023 · 2 comments
Open

Issue with PCL version vs C++ version #5

BavanthaU opened this issue Mar 3, 2023 · 2 comments

Comments

@BavanthaU
Copy link

I am trying to build this package in Ubuntu 20.04 and it errored out with following message,

/usr/include/pcl-1.10/pcl/conversions.h:317:28: note:   no known conversion for argument 1 from ‘const pcl::PCLPointField’ to ‘const int&’
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/string:40,
                 from /usr/include/c++/9/stdexcept:39,
                 from /usr/include/c++/9/array:39,
                 from /usr/include/c++/9/tuple:39,
                 from /usr/include/c++/9/mutex:38,
                 from /home/bavantha/catkin_ws/src/mesh_rviz_plugins/include/mesh_rviz_plugins/textured_mesh_visual.h:25,
                 from /home/bavantha/catkin_ws/src/mesh_rviz_plugins/src/textured_mesh_visual.cc:22:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)>]’:
/usr/include/c++/9/bits/stl_algo.h:120:14:   required from ‘_RandomAccessIterator std::__find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = __gnu_cxx::__ops::_Iter_pred<pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)> >]’
/usr/include/c++/9/bits/stl_algo.h:161:23:   required from ‘_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = __gnu_cxx::__ops::_Iter_pred<pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)> >]’
/usr/include/c++/9/bits/stl_algo.h:3969:28:   required from ‘_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)>]’
/usr/include/pcl-1.10/pcl/common/io.h:65:77:   required from here
/usr/include/c++/9/bits/predefined_ops.h:283:11: error: no match for call to ‘(pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)>) (const pcl::PCLPointField&)’
  283 |  { return bool(_M_pred(*__it)); }

@BavanthaU
Copy link
Author

I temporarily fixed the error by adding following two lines in the project CMakeLists.txt file. Hope it helps someone.

 set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

@ShigemichiMatsuzaki
Copy link

Yes, it did help me a lot. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants