当前位置:网站首页>Pangolin库链接库问题
Pangolin库链接库问题
2022-07-29 11:36:00 【guoqiang_sunshine】
Problem 1:C++标准以及链接库问题,这个问题的根本原因是由于pangolin在版本升级过程中出现的c++版本兼容不同导致
报错显示如下:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
显然是C++11标准的问题,因此在CMakeLists.txt文件中指定C++11
add_definitions(-std=c++11)
Problem 2: pangolin的一些函数没有定义,说明pangolin没有被链接
报错显示如下:
CMakeFiles/plat_analyse.dir/main.cpp.o:(.data+0x0): undefined reference to `vtable for pangolin::Handler'
包含了pangolin库的头文件,而pangolin的一些函数没有定义,说明pangolin没有被链接,在CMakeLists.txt中继续添加
target_link_libraries(plat_analyse pangolin)
Problem 3: 缺少GL库链接
查找到这个东西在OpenGL库中,说明OpenGL库没有被链接,查找OpenGL库的头文件,其中一个是gl.h,通过下面指令找到gl.h所在目录是/usr/include/GL
报错显示如下:
/usr/bin/ld: CMakeFiles/plat_analyse.dir/main.cpp.o: undefined reference to symbol 'glTexImage2D'
sudo find / -name gl.h
一般目录名对应的就是库名,所以CMakeLists.txt中添加(通过sudo find / -name libGL*命令的确查找到这个库)
添加链接GL库的原因
target_link_libraries(plat_analyse GL)
Problem 4: 缺少GLEW库链接
报错显示如下:
/usr/bin/ld: CMakeFiles/plat_analyse.dir/main.cpp.o: undefined reference to symbol '__glewDeleteBuffers'
同样是库没有链接GLEW库的原因,继续添加
target_link_libraries(plat_analyse GLEW)
边栏推荐
- 『知识集锦』一文搞懂mysql索引!!(建议收藏)
- 1.MySQL数据库的介绍
- mysql single-line, multi-line subquery
- One click blog building: how to use WordPress plug-in to build a dedicated blog
- PaddleLite 编译以及代码跑通复盘
- Meituan and hungry were interviewed by Hangzhou supervisors to implement the responsibility of food safety management and prohibit malicious competition
- HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
- MySql启动、连接sqlog、主从复制、双机热备(开机时)
- What is kubernetes custom resource definition (CRD)?
- 就这?TypeScript其实并不难!(建议收藏)
猜你喜欢

MySql启动、连接sqlog、主从复制、双机热备(开机时)

怎么以管理员身份运行cmd?以管理员身份运行cmd方法介绍

Lucky draw system with background source code

QML(二):设置自定义窗体

puzzle(017.5)联动归位

AI model risk assessment Part 2: core content

【图像检测】基于灰度图像的积累加权边缘检测方法研究附matlab代码

CSDN TOP1“一个处女座的程序猿“如何通过写作成为百万粉丝博主
![[image detection] Research on cumulative weighted edge detection method based on gray image, with matlab code](/img/c1/f962f1c1d9f75732157d49a5d1d0d6.png)
[image detection] Research on cumulative weighted edge detection method based on gray image, with matlab code

企业微信客户朋友圈一天可以发多少条?都有哪些限制?如何突破朋友圈可展示人数限制?
随机推荐
IPv6 Foundation
面试官培训课件(非常实用的企业内训课件)
IPV6基础
JS two array objects for merging and de duplication
Std:: vector copy, append, nested access
SkiaSharp of WPF custom painting to bounce ball (case)
共建共享数字世界的根:阿里云打造全面的云原生开源生态
大伟 Golang之路
如何在匹配行之前使用 grep 显示文件名和行号
解决idea在debug模式下变得非常慢的问题
DNS协议、ICMP协议、NAT技术
Gbase8s core data backup
Design and implementation of gbase8s Informix dodker high availability cluster self recovery cluster startup command oninitdb
【年中总结】创业3年,越来越穷,还是坚持架构平台
就这?TypeScript其实并不难!(建议收藏)
谷歌“消灭” Cookie 计划延至 2024 年
Talk about the establishment of performance testing environment
基于flask写的一个小商城mall项目
Golang realizes file upload and download
【图像检测】基于灰度图像的积累加权边缘检测方法研究附matlab代码