0

I am new to C++ and pcl. I use Ubuntu 16.04. I just want to try pcl PFH estimation. And I need to use two files:point_types.h and features/pfh.h. I included them at the top of my .cpp file:

"include usr/include/pcl-1.7/pcl/point_types.h"
"include usr/include/pcl-1.7/pcl/features/pfh.h"

There is an error fatal error:

usr/include/pcl-1.7/pcl/point_types.h: No such file or directory

Why is that? Very grateful!

Priya
  • 1,359
  • 6
  • 21
  • 41

1 Answers1

0

Check whether the pcl library is installed or not by using the below command.

ldconfig -p | grep libpcl

If you couldn't find anything then install it via PCL PPA

sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all-dev
jblixr
  • 1,345
  • 13
  • 34
  • HI, I checked in terminal and several .so files appeared with the path "usr/lib/x86-64-linux-gnu" And my .h files are in "usr/include/pcl-1.7/pcl" Is that OK? Very grateful! – Aileenlingyu Oct 04 '16 at 05:21
  • Try `/` before `usr/include` i.e `/usr/include/` – jblixr Oct 04 '16 at 05:28
  • I tried it and the previous error was solved but there is a new silimilar one. The project can find point_types.h and pfh.h now, but beacuse the point_types.h itself calls anoher .h file which is in usr/include/pcl-1.7/pcl The error becomes pcl/pcl_macros.h: No such file or directory . How could I add the pcl path to the whole project to avoid this kind of error?Thanks a lot!@jblixr – Aileenlingyu Oct 04 '16 at 05:39
  • Include header search path as `-I/` for compiling, i.e `g++ -I/ yourfile.cpp` – jblixr Oct 04 '16 at 05:59
  • So just add -I/usr/include/pcl-1.7/pcl in the top of my cpp file in sublime text? The system seems to ignore the -I line. Could you explain more on how to do with -I flag? Sorry I really know nothing about C++ at this time...Very grateful!@jblixr – Aileenlingyu Oct 04 '16 at 06:48