pcl/pcl_config.h: 没有那个文件或目录 [英] pcl/pcl_config.h: No such file or directory
问题描述
我的环境如下.
・操作系统和版本:windows 10 64bit
・编译器:C:\msys64\mingw64\bin\g++.exe
・PCL 版本:1.9.1
pcl_config.h not found as below 在上述环境下编译时发生错误..
当然不包括这个头文件.
让我知道如何解决它.
PS C:\pcl\pcl\examples\common> g++ -o minmax -I ../../io/include -I ../../common/include .\example_get_max_min_coordinates.cpp
在 ../../common/include/pcl/PCLHeader.h:10,
包含的文件中来自 ../../common/include/pcl/point_cloud.h:47,
来自 ../../io/include/pcl/io/pcd_io.h:42,
来自 .\example_get_max_min_coordinates.cpp:2:
../../common/include/pcl/pcl_macros.h:64:10: 致命错误:
pcl/pcl_config.h: 没有那个文件或目录
#include
^~~~~~~~~~~~~~~~~~~~~~
编译终止.
My environment is below.
・Operating System and version:windows 10 64bit
・Compiler:C:\msys64\mingw64\bin\g++.exe
・PCL Version:1.9.1
pcl_config.h not found as below error occurred when compiled under above env..
Certainly this header file is not included.
Let me know how to solve it.
PS C:\pcl\pcl\examples\common> g++ -o minmax -I ../../io/include -I ../../common/include .\example_get_max_min_coordinates.cpp
In file included from ../../common/include/pcl/PCLHeader.h:10,
from ../../common/include/pcl/point_cloud.h:47,
from ../../io/include/pcl/io/pcd_io.h:42,
from .\example_get_max_min_coordinates.cpp:2:
../../common/include/pcl/pcl_macros.h:64:10: fatal error:
pcl/pcl_config.h: No such file or directory
#include
^~~~~~~~~~~~~~~~~~
compilation terminated.
推荐答案
简短回答
pcl_config.h
由 cmake
工具.所以看起来编译没有正确完成.
Short answer
pcl_config.h
is generated via pcl_config.h.in
by the cmake
tool. So it seems that compilation did not finish correctly.
- 在继续之前,请确保您已经编译了 PCL 的相关模块(至少是 pcl-core)
- 您可能更喜欢从 releases 或通过包/源分发的预构建安装您选择的经理
- PCL 大量使用其他库,最好通过 CMake 或手动通过
-I
和-l
选项提供依赖项(如下所述).如果您提供pcl_config.h
的位置,编译器接下来会抱怨Eigen
.
- Please make sure you have compiled the relevant modules of PCL (at least pcl-core) before proceeding
- You might prefer a pre-built installation from releases or distributed by a package/source manager of your choice
- PCL makes heavy use of other libraries and it is best to supply the dependencies (as mentioned below) via CMake or manually via the
-I
and-l
options. If you provide the location ofpcl_config.h
, the compiler will complain aboutEigen
next.
构建说明可在此处获得.TL;DR:在满足依赖项(cmake、c++ 编译器、boost、eigen、flann、vtk 和其他取决于用例)后,运行以下命令
The build instructions are available here. TL;DR: After satisfying the dependencies (cmake, c++ compiler, boost, eigen, flann, vtk and other depending on use-case), run the following commands
cd $PCL_SOURCE_DIR
mkdir -p build; cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8
您可以根据需要随意使用任何构建生成器(如 Ninja)或将构建类型更改为 Debug
或 RelWithDebInfo
.
Feel free to use any build generator (like Ninja) or change build type to Debug
or RelWithDebInfo
as per your needs.
这篇关于pcl/pcl_config.h: 没有那个文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!