/usr/bin/ld: warning: libopencv_imgcodecs.so.3.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_high

2023-05-16

出现一个警告信息,暂时不管


/usr/bin/ld: warning: libopencv_imgcodecs.so.3.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2.0, may conflict with libopencv_imgcodecs.so.3.3
/usr/bin/ld: warning: libopencv_imgproc.so.3.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2.0, may conflict with libopencv_imgproc.so.3.3
/usr/bin/ld: warning: libopencv_core.so.3.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2.0, may conflict with libopencv_core.so.3.3
[100%] Built target eco_tracker

最后知道了原因,是因为cmakelists引用了错误的OpenCV版本,第十行代码set(OpenCV_DIR /usr/share/OpenCV)应该注释掉

#set(OpenCV_DIR /usr/share/OpenCV)

应该注释掉。下面是正确的cmakelist文件。注意,这是eco_tracker的package里面的cmakelists.txt

cmake_minimum_required(VERSION 3.0.2)
project(eco_tracker)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
#set(OpenCV_DIR /usr/share/OpenCV)

find_package(catkin REQUIRED COMPONENTS
  geometry_msgs
  roscpp
  rospy
  sensor_msgs
  std_msgs
  OpenCV
  cv_bridge
  image_transport
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()

################################################
## Declare ROS messages, services and actions ##
################################################

## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
##   * add a build_depend tag for "message_generation"
##   * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependency has been pulled in
##     but can be declared for certainty nonetheless:
##     * add a exec_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
##   * add "message_generation" and every package in MSG_DEP_SET to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * add "message_runtime" and every package in MSG_DEP_SET to
##     catkin_package(CATKIN_DEPENDS ...)
##   * uncomment the add_*_files sections below as needed
##     and list every .msg/.srv/.action file to be processed
##   * uncomment the generate_messages entry below
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   geometry_msgs#   sensor_msgs#   std_msgs
# )

################################################
## Declare ROS dynamic reconfigure parameters ##
################################################

## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
##   * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
##   * add "dynamic_reconfigure" to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * uncomment the "generate_dynamic_reconfigure_options" section below
##     and list every .cfg file to be processed

## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
#   cfg/DynReconf1.cfg
#   cfg/DynReconf2.cfg
# )

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES eco_tracker
#  CATKIN_DEPENDS geometry_msgs roscpp rospy sensor_msgs std_msgs
#  DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
  "/usr/local/include/opentracker"
)

find_library(OpenTracker_LIBS libopentracker.so /usr/local/lib)


## Declare a C++ library
# add_library(${PROJECT_NAME}
#   src/${PROJECT_NAME}/eco_tracker.cpp
# )

## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(eco_tracker src/eco_tracker.cpp)

## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")

## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node
#   ${catkin_LIBRARIES}
# )
target_link_libraries(eco_tracker ${catkin_LIBRARIES} ${OpenCV_LIBS} ${OpenTracker_LIBS})

#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html

## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# catkin_install_python(PROGRAMS
#   scripts/my_python_script
#   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
# install(TARGETS ${PROJECT_NAME}_node
#   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
# install(TARGETS ${PROJECT_NAME}
#   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
# )

## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
#   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
#   FILES_MATCHING PATTERN "*.h"
#   PATTERN ".svn" EXCLUDE
# )

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
#   # myfile1
#   # myfile2
#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )

#############
## Testing ##
#############

## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_eco_tracker.cpp)
# if(TARGET ${PROJECT_NAME}-test)
#   target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()

## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

/usr/bin/ld: warning: libopencv_imgcodecs.so.3.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_high 的相关文章

随机推荐

  • 研究基于PX4平台的Ardupilot代码工程的makefile结构

    最近有空 xff0c 于是想花时间好好研究下ardupilot的软件架构 xff0c 经过对ardupilot一段时间的熟悉和使用后 xff0c 对其软件架构已经有了一定的理解 xff0c 但还称不上特别完备 xff0c 所以想把每一部分的
  • Px4固件升级流程。

    PX4飞控的固件升级可以简单的分为6步 xff0c 具体如下 xff1a 1 重启飞控 重启飞控 xff0c APP发送指令mavlink飞控重启指令 等待0 5s后进入下一步 xff1b 2 识别bootloader APP发送 0x21
  • pixhawk入门知识

    Pixhawk是一种先进的自动驾驶仪 xff0c 由PX4开放硬件项目设计和3D机器人制造 它具有来自ST公司先进的处理器和传感器技术 xff0c 以及NuttX实时操作系统 xff0c 能够实现惊人的性能 xff0c 灵活性和可靠性控制任
  • MDK 注册机下载路径

    MDK下载路径 https editor csdn net md articleId 61 115338061
  • MathJax 3.0 配置方法,上手配置

    说明 网上很多MathJax 的配置方法适用于旧版本 新版的MathJax做了一些改进 配置方式也做了调整 最简单的方案 方便起见 最简单的方案如下 span class token tag span class token tag spa
  • VsCode+LaTexWorkshop外置PDF预览配置(2021.3.3)

    随着插件版本的升级有些配置命令发生了改变 xff0c 这里只是做个简单记录 xff0c 写的比较粗糙 后面有闲工夫再来做做美工 VsCode一侧配置 34 latex workshop view pdf viewer 34 34 exter
  • MATLAB批量为png透明(抠图)图片替换添加背景

    MATLAB批量为png透明 抠图 图片替换添加背景 说明 最近有个小需求 需要抠图后将抠图的背景替换为指定图片 如果一张一张做 图片多了实在是不好用 前提 准备好背景图片 一张准备好目标图片 很多张可以利用powertoys将目标图片统一
  • PilotPi:树莓派运行PX4配置方法

    直接看最后 即可 前言 PX4开源飞控固件支持很多款硬件 包括pixhawk cuav 和 cube等 在1 12版本中px4官方开始实验性的支持树莓派直接运行 这样我们就可以在树莓派上直接运行飞控程序 考虑到树莓派处理器的性能 那么就算可
  • PX4 1.12版本后启用lpe导致飞控启动失败的问题的解决办法

    时间 20220531 问题 在PX4 升级到1 12后使用local position estimator也就是LPE后会导致飞控启动失败 从SD卡的log中可以看到是硬件错误 解决办法 将文件 PX4Firmware根目录中的文件 pl
  • 多旋翼/四旋翼半物理(硬件在环HIL)仿真

    半物理仿真平台基本框架如图所示 多旋翼HIL平台结构图 其中 xff0c 最重要的也就是中间的部分 xff0c 一个是多旋翼模型 xff0c 另一个是传感器部分实现 硬件平台目前使用的是NI的myRIO xff08 临时的 xff09 xf
  • 如何编写VeriStand custom device/custom FPGA Target以及基本原理

    在做HIL开发的时候用到了FPGA xff0c 对于Labview中可以很方便的使用FPGA xff0c 但是在用VeriStand 做模型仿真的时候 xff0c 调用FPGA就没呢么方便了 感觉就是功能还没有完善 如果想要在Labview
  • 提高github下载速度的方法【100%有效】可达到2MB/s

    在国内从github上面下载代码的速度峰值通常都是20kB s 这种速度对于那些小项目还好 xff0c 而对于大一些的并且带有很多子模块的项目来讲就跟耽误时间 虽然有很多提速的方法 xff0c 但是实际用起来并不稳定 这里提供一种新的方法
  • 如何理解选主元的Doolittle分解法

    书中讲解不是很详细 xff0c 理解之后总结一下 首先说一下 xff0c 之所以要理解选主元的Doolittle分解是因为书中对于该分解过程的讲解比较违和 本文的目的是为了说明 xff1a 选主元的Doolittle分解法分解得到的LU矩阵
  • Latex中插入eps图片不显示,显示空白

    Latex中插入eps图片变异后 xff0c 生成的pdf文件中 xff0c 图片为空白 在文章开头 documentclas 后面添加如下代码即可 usepackage graphicx usepackage epstopdf 或者 us
  • C/C++ 信号量 CreateSemaphore 用法

    HANDLE CreateSemaphore LPSECURITY ATTRIBUTES lpSemaphoreAttributes SD LONG lInitialCount initial count LONG lMaximumCoun
  • 单片机寄存器的位操作

    1 连续多位需要操作 假如需要将B16的D8 D10位改为0001 xff0c 但是更改D8 D10位时又不能改变其它位状态 xff1a 所以需要先将D8 D10位 清0 xff0c 再改为0001 PORTB gt PCR 16 amp
  • DockerFile编写、加载、镜像保存、上传阿里云镜像

    DockerFile用来构建docker镜像文件 指令 说明 FROM 指定基础镜像 MAINTAINER 镜像是谁写的 xff0c 姓名 43 邮箱 RUN 镜像构建的时候需要运行的命令 ADD 将本地文件添加到容器中 xff0c tar
  • 手把手教你写一个属于自己的库

    写在前面 xff1a 本文章使用devc 43 43 xff0c 若用VC的别进来 xff01 如果你不知道怎么写库 xff0c 请参考我这篇文章 xff1a 手把手教你建立c 43 43 个人库 在新建好库文件之后 xff0c 我们就可以
  • warning: libopencv_imgcodecs.so.3.2, needed by /...warning: libpng12.so.0, needed by /usr/local/lib/

    warning libopencv imgcodecs so 3 2 needed by opt ros melodic lib libcv bridge so may conflict with libopencv imgcodecs s
  • /usr/bin/ld: warning: libopencv_imgcodecs.so.3.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_high

    出现一个警告信息 xff0c 暂时不管 usr bin ld warning libopencv imgcodecs so 3 2 needed by usr lib x86 64 linux gnu libopencv highgui s