码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Ubuntu 20.04.05安装PCL-1.12.0


    1、安装QT-5.9.9

    链接1: Ubuntu20.04安装、配置、使用、卸载QT5.9.9以及第一个编写QT程序.
    或者
    链接2: 在ubuntu用命令安装和卸载qt4、qt5(亲测有效).

    2、安装VTK-7.1.1+PCL-1.12.0

    链接1: ubuntu20.04下安装pcl.
    或者
    链接2: PCL1.12+VTK7.1.1 && Ubuntu20.04.3+VSCode(官网最新版2022.01).

    VTK安装成功测试:https://www.jb51.cc/server/4186930.html

    3、cmake-gui编译VTK遇到的问题

    (1)CMP0022(Warning)

    问题描述:CMake Deprecation Warning at ThirdParty/libproj4/vtklibproj4/cmake/policies.cmake:2 (cmake_policy):> The OLD behavior for policy CMP0022 will be removed from a future version of CMake.
    The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): ThirdParty/libproj4/vtklibproj4/CMakeLists.txt:43 (include)
    解决方法:/VTK-7.1.1/ThirdParty/libproj4/vtklibproj4/cmake/policies.cmake对应与Policy CMP0022修改,如下。

    if (CMAKE_MAJOR_VERSION GREATER 2)
        cmake_policy(SET CMP0022 NEW) # interface link libraries
        cmake_policy(SET CMP0042 NEW) # osx rpath
        cmake_policy(SET CMP0011 NEW) # policy setting
    endif()
    
    • 1
    • 2
    • 3
    • 4
    • 5

    (2)CMP0072(Warning)

    问题描述:CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run “cmake --help-policy CMP0072” for policy details. Use the cmake_policy command to set the policy and suppress this warning.
    FindOpenGL found both a legacy GL library:
    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
    and GLVND libraries for OpenGL and GLX:
    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
    OpenGL_GL_PREFERENCE has not been set to “GLVND” or “LEGACY”, so for
    compatibility with CMake 3.10 and below the legacy GL library will be used.
    Call Stack (most recent call first): CMake/vtkOpenGL.cmake:77 (find_package)
    Rendering/VolumeOpenGL2/CMakeLists.txt:67 (include)
    This warning is for project developers. Use -Wno-dev to suppress it.
    解决方法: 在/VTK-7.1.1/CMakeLists.txt文件中加入下面内容。

    if (POLICY CMP0072)
    	set(OpenGL_GL_PREFERENCE LEGACY)
    endif()
    
    • 1
    • 2
    • 3

    如下图所示。
    在这里插入图片描述

    4、cmake编译PCL遇到的问题

    (1)ClangFormat

    问题描述:Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE ClangFormat_VERSION) (Required is at least version “10”)
    解决方法:sudo apt-get install clang-format-10

    (2)metslib

    问题描述:Checking for module ‘metslib’ – No package ‘metslib’ found
    解决方法:下载并安装metslib包,下载链接: metslib-0.5.3.,解压并进入metslib-0.5.3文件夹,然后执行
    sudo sh ./configure
    sudo make
    sudo make install

    (3)PNG

    问题描述:Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
    解决方法:sudo apt-get install libpng-dev

    (4)PCAP

    问题描述:Could NOT find Pcap (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS)
    解决方法:安装pcap包,依次执行
    git clone https://github.com/the-tcpdump-group/libpcap
    cd libpcap
    ./configure # 可能会遇到 configure: error: Neither flex nor lex was found. 见下“注”
    make -j8
    sudo make install

    注:如果在./configure时出现 configure: error: Neither flex nor lex was found.
    运行:sudo apt-get install flex bison

    (5)GLEN

    问题描述:Could NOT find GLEW (missing: GLEW_INCLUDE_DIR GLEW_LIBRARY)
    解决方法:sudo apt install libglew-dev

  • 相关阅读:
    自定义View5 -塔防小游戏:第二篇防御塔随意放置
    【MySQL】_JDBC
    正点原子lwIP学习笔记——Socket接口TCP实验
    技术岗/算法岗面试如何准备?5000字长文、6个角度以2023秋招经历分享面试经验
    数据生态第三弹 | RocketMQ OpenMLDB Connector,实时数据到特征工程的高速传输
    【毕业设计】基于深度学习卷积神经网络的手写字符识别
    43页县域农业大数据运营服务中心方案介绍
    快速学会git版本管理——创建分支和合并分支
    怎么将两个PDF合并成一个?这里有三个小妙招分享给你
    Vue中的单向数据绑定和双向数据绑定到底是什么
  • 原文地址:https://blog.csdn.net/zhiTjun/article/details/128067182
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号