gpt4 book ai didi

linux - 包库和头文件安装在哪里?

转载 作者:IT王子 更新时间:2023-10-29 00:32:12 33 4
gpt4 key购买 nike

在Ubuntu中下载并安装包后,如何查看库和头文件写入的位置?我相信这与包的 .pc 文件有关,但我也不知道如何找到该文件。

例如,我下载了 PCL(点云库)包,然后在示例 CMakeLists.txt 文件中,我得到了以下内容:

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

这些环境变量在哪里定义的,我怎样才能看到它们?

如果我从源代码而不是通过包编译库,会有什么不同吗?会自动创建 .pc 文件吗?

最佳答案

如果安装包含 libpcl 开发文件的包

sudo apt-get install libpcl-dev

您可以列出已安装的文件

dpkg -L libpcl-dev

查看所有 header 的位置。

...
/usr/include/pcl-1.7/pcl/filters/fast_bilateral.h
/usr/include/pcl-1.7/pcl/filters/voxel_grid_covariance.h
/usr/include/pcl-1.7/pcl/filters/voxel_grid_occlusion_estimation.h
/usr/include/pcl-1.7/pcl/filters/median_filter.h
/usr/include/pcl-1.7/pcl/filters/crop_box.h
/usr/include/pcl-1.7/pcl/filters/voxel_grid_label.h
/usr/include/pcl-1.7/pcl/filters/covariance_sampling.h
/usr/include/pcl-1.7/pcl/filters/random_sample.h
/usr/include/pcl-1.7/pcl/filters/normal_refinement.h
/usr/include/pcl-1.7/pcl/filters/project_inliers.h
/usr/include/pcl-1.7/pcl/filters/fast_bilateral_omp.h
/usr/include/pcl-1.7/pcl/filters/clipper3D.h
/usr/include/pcl-1.7/pcl/filters/convolution.h
/usr/include/pcl-1.7/pcl/filters/passthrough.h
/usr/include/pcl-1.7/pcl/filters/conditional_removal.h
/usr/include/pcl-1.7/pcl/filters/impl
/usr/include/pcl-1.7/pcl/filters/impl/frustum_culling.hpp
/usr/include/pcl-1.7/pcl/filters/impl/conditional_removal.hpp
/usr/include/pcl-1.7/pcl/filters/impl/convolution_3d.hpp
/usr/include/pcl-1.7/pcl/filters/impl/voxel_grid_covariance.hpp
/usr/include/pcl-1.7/pcl/filters/impl/fast_bilateral_omp.hpp
/usr/include/pcl-1.7/pcl/filters/impl/project_inliers.hpp
/usr/include/pcl-1.7/pcl/filters/impl/morphological_filter.hpp
/usr/include/pcl-1.7/pcl/filters/impl/crop_box.hpp
/usr/include/pcl-1.7/pcl/filters/impl/covariance_sampling.hpp
/usr/include/pcl-1.7/pcl/filters/impl/local_maximum.hpp
/usr/include/pcl-1.7/pcl/filters/impl/plane_clipper3D.hpp
/usr/include/pcl-1.7/pcl/filters/impl/bilateral.hpp
/usr/include/pcl-1.7/pcl/filters/impl/voxel_grid_occlusion_estimation.hpp
....

关于linux - 包库和头文件安装在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26529155/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com