CMake Error at precise_land/CMakeLists.txt:214 (target_link_libraries): Cannot specify link libraries for target "traj_pub" which is not built by this project. -- Configuring incomplete, errors occurred! See also "/home/ros/catkin_ctr/build/CMakeFiles/CMakeOutput.log". See also "/home/ros/catkin_ctr/build/CMakeFiles/CMakeError.log". make: *** [Makefile:3358:cmake_check_build_system] 错误 1 Invoking "make cmake_check_build_system" failed

时间: 2024-03-23 17:40:35 浏览: 19
这个错误提示是说在 CMakeLists.txt 文件中,你为 `traj_pub` 目标程序指定了链接库,但是该程序并不是由该项目构建的,因此无法指定链接库。 要解决这个问题,你需要在 CMakeLists.txt 文件中添加一个 `add_executable` 命令来创建 `traj_pub` 目标程序。例如,你可以在 CMakeLists.txt 文件中添加以下行: ``` add_executable(traj_pub src/traj_pub.cpp) ``` 这将创建一个名为 `traj_pub` 的目标程序,其源文件为 `src/traj_pub.cpp`。 然后,你可以使用 `target_link_libraries` 命令为该目标程序指定链接库。例如,如果你要为 `traj_pub` 目标程序链接 `catkin_LIBRARIES` 库,可以将以下行: ``` target_link_libraries(traj_pub ${catkin_LIBRARIES}) ``` 添加到 CMakeLists.txt 文件中。 修改完成后,重新运行 `catkin_make` 命令重新编译你的项目即可。
相关问题

CMake Error at robot_vision/CMakeLists.txt:236 (target_link_libraries): Cannot specify link libraries for target "text" which is not built by this project.

这个错误是由于在 CMakeLists.txt 的第 236 行中,你尝试为名为 "text" 的目标指定链接库,但是该目标并不是由当前项目构建的。可能是你在当前的项目中使用了名为 "text" 的外部库。解决方法是检查 CMakeLists.txt 文件中是否正确引用了外部库,并确保该库已正确安装和可用。如果该库不是必需的,你可以尝试删除与它相关的行。

CMake Error at plumbing_pub_sub/CMakeLists.txt:137 (add_executable): Cannot find source file:

引用\[1\]:CMake Error at plumbing_pub_sub/CMakeLists.txt:148 (add_dependencies): The dependency target "plumbing_pub_sub_generate_message_cpp" of target "demo03_pub_person" does not exist. 引用\[2\]:CMake Error at CMakeLists.txt:4 (CMAKE_MINIMUM_REQUIRED): CMake 3.0.2 or higher is required. You are running version 2.8.12.2-- Configuring incomplete, errors occurred! 引用\[3\]:1、下载:curl -O https://cmake.org/files/v3.6/cmake-3.6.0-Linux-x86_64.tar.gz 2、解压:tar -zxvf cmake-3.6.0-Linux-x86_64.tar.gz 注意:这个压缩包不是源码包,解压后直接用。 3、增加环境变量,使其成为全局变量: vim /etc/profile 在文件末尾处增加以下代码 export PATH=$PATH:/lnmp/src/cmake-3.6.0-Linux-x86_64/bin 注意:写自己刚安装cmake的bin的路径 使修改的文件生效 source /etc/profile 4、查看环境变量: echo $PATH 5、检查cmake版本: cmake --version 问题: CMake Error at plumbing_pub_sub/CMakeLists.txt:137 (add_executable): Cannot find source file: 回答: 根据引用\[1\]中的错误信息,CMake在执行add_dependencies时报错,提示目标"plumbing_pub_sub_generate_message_cpp"不存在。这可能是由于CMakeLists.txt文件中的依赖关系设置有误导致的。另外,引用\[2\]中的错误信息显示你正在使用的CMake版本过低,需要使用CMake 3.0.2或更高版本。你可以根据引用\[3\]中的步骤下载并安装最新版本的CMake,并将其添加到全局环境变量中。这样可以解决CMake版本不兼容的问题。至于CMake Error at plumbing_pub_sub/CMakeLists.txt:137 (add_executable): Cannot find source file:的具体原因,需要查看CMakeLists.txt文件中的代码,确认是否正确指定了源文件的路径。 #### 引用[.reference_title] - *1* [ROS通信部分编译错误](https://blog.csdn.net/m0_44999129/article/details/123158488)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [CMake安装或CMake Error at CMakeLists](https://blog.csdn.net/banyu0052/article/details/101946043)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

相关推荐

ubuntu16.04运行时报错CMake Error at bobac2_description/CMakeLists.txt:147 (add_dependencies): Cannot add target-level dependencies to non-existent target "bobac2_description_node". The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. CMake Error at bobac2_description/CMakeLists.txt:150 (target_link_libraries): Cannot specify link libraries for target "bobac2_description_node" which is not built by this project. -- Configuring incomplete, errors occurred! See also "/home/bobac3/ros_workspace/build/CMakeFiles/CMakeOutput.log". See also "/home/bobac3/ros_workspace/build/CMakeFiles/CMakeError.log". Makefile:2796: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1 CMake Error at bobac2_description/CMakeLists.txt:147 (add_dependencies): Cannot add target-level dependencies to non-existent target "bobac2_description_node". The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. CMake Error at bobac2_description/CMakeLists.txt:150 (target_link_libraries): Cannot specify link libraries for target "bobac2_description_node" which is not built by this project. -- Configuring incomplete, errors occurred! See also "/home/bobac3/ros_workspace/build/CMakeFiles/CMakeOutput.log". See also "/home/bobac3/ros_workspace/build/CMakeFiles/CMakeError.log". Makefile:2796: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1

最新推荐

recommend-type

yolov5-face-landmarks-opencv

yolov5检测人脸和关键点,只依赖opencv库就可以运行,程序包含C++和Python两个版本的。 本套程序根据https://github.com/deepcam-cn/yolov5-face 里提供的训练模型.pt文件。转换成onnx文件, 然后使用opencv读取onnx文件做前向推理,onnx文件从百度云盘下载,下载 链接:https://pan.baidu.com/s/14qvEOB90CcVJwVC5jNcu3A 提取码:duwc 下载完成后,onnx文件存放目录里,C++版本的主程序是main_yolo.cpp,Python版本的主程序是main.py 。此外,还有一个main_export_onnx.py文件,它是读取pytorch训练模型.pt文件生成onnx文件的。 如果你想重新生成onnx文件,不能直接在该目录下运行的,你需要把文件拷贝到https://github.com/deepcam-cn/yolov5-face 的主目录里运行,就可以生成onnx文件。
recommend-type

setuptools-0.6c8-py2.5.egg

文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
recommend-type

5-3.py

5-3
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

实现实时数据湖架构:Kafka与Hive集成

![实现实时数据湖架构:Kafka与Hive集成](https://img-blog.csdnimg.cn/img_convert/10eb2e6972b3b6086286fc64c0b3ee41.jpeg) # 1. 实时数据湖架构概述** 实时数据湖是一种现代数据管理架构,它允许企业以低延迟的方式收集、存储和处理大量数据。与传统数据仓库不同,实时数据湖不依赖于预先定义的模式,而是采用灵活的架构,可以处理各种数据类型和格式。这种架构为企业提供了以下优势: - **实时洞察:**实时数据湖允许企业访问最新的数据,从而做出更明智的决策。 - **数据民主化:**实时数据湖使各种利益相关者都可
recommend-type

2. 通过python绘制y=e-xsin(2πx)图像

可以使用matplotlib库来绘制这个函数的图像。以下是一段示例代码: ```python import numpy as np import matplotlib.pyplot as plt def func(x): return np.exp(-x) * np.sin(2 * np.pi * x) x = np.linspace(0, 5, 500) y = func(x) plt.plot(x, y) plt.xlabel('x') plt.ylabel('y') plt.title('y = e^{-x} sin(2πx)') plt.show() ``` 运行这段
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。
recommend-type

"互动学习:行动中的多样性与论文攻读经历"

多样性她- 事实上SCI NCES你的时间表ECOLEDO C Tora SC和NCESPOUR l’Ingén学习互动,互动学习以行动为中心的强化学习学会互动,互动学习,以行动为中心的强化学习计算机科学博士论文于2021年9月28日在Villeneuve d'Asq公开支持马修·瑟林评审团主席法布里斯·勒菲弗尔阿维尼翁大学教授论文指导奥利维尔·皮耶昆谷歌研究教授:智囊团论文联合主任菲利普·普雷教授,大学。里尔/CRISTAL/因里亚报告员奥利维耶·西格德索邦大学报告员卢多维奇·德诺耶教授,Facebook /索邦大学审查员越南圣迈IMT Atlantic高级讲师邀请弗洛里安·斯特鲁布博士,Deepmind对于那些及时看到自己错误的人...3谢谢你首先,我要感谢我的两位博士生导师Olivier和Philippe。奥利维尔,"站在巨人的肩膀上"这句话对你来说完全有意义了。从科学上讲,你知道在这篇论文的(许多)错误中,你是我可以依
recommend-type

实现实时监控告警系统:Kafka与Grafana整合

![实现实时监控告警系统:Kafka与Grafana整合](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tbWJpei5xcGljLmNuL21tYml6X2pwZy9BVldpY3ladXVDbEZpY1pLWmw2bUVaWXFUcEdLT1VDdkxRSmQxZXB5R1lxaWNlUjA2c0hFek5Qc3FyRktudFF1VDMxQVl3QTRXV2lhSWFRMEFRc0I1cW1ZOGcvNjQw?x-oss-process=image/format,png) # 1.1 Kafka集群架构 Kafka集群由多个称为代理的服务器组成,这