ROS创建功能包后显示错误:
Could NOT find std_src (missing: std_src_DIR)
– Could not find the required component ‘std_src’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
****CMake Error a/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by “std_src” with any
of the following names:
std_srcConfig.cmake
std_src-config.cmake
Add the installation prefix of “std_src” to CMAKE_PREFIX_PATH or set
“std_src_DIR” to a directory containing one of the above files. If
“std_src” provides a separate development package or SDK, be sure it has
been installed.
all Stack (most recent call first):
learning_tf/CMakeLists.txt:10 (find_package)
– Configuring incomplete, errors occurred!
See also “/home/cx/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/cx/catkin_ws/build/CMakeFiles/CMakeError.log”.
make: *** [Makefile:1188:cmake_check_build_system] 错误 1
Invoking “make cmake_check_build_system” failed
似乎是这个文件的第十行有问题(learning_tf/CMakeLists.txt:10 (find_package))
显示没有std_src的相关包,于是找到这一行:
将std_src单独提取出来
find_package(std_src)
这时候就可以成功编译了