大佬教程收集整理的这篇文章主要介绍了cmake 未包含 Gazebo 依赖项,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我是 cmake 的新手。我试图从其他两个人那里创建一个新的 cmake 项目。您创建的 cmake 是两者的混合:
cmake_minimum_required(VERSION 3.5.0)
project(GazeboDronE)
find_package(gazebo required)
include_directorIEs(${GAZEBO_INCLUDE_Dirs})
link_directorIEs(${GAZEBO_liBRARY_Dirs})
List(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")
List(APPEND CMAKE_MODulE_PATH "${CR_167_11845@AKE_CURRENT_List_DIR}/../cmake-modules")
INCLUDE("${CR_167_11845@AKE_CURRENT_List_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()
IncludeEigen()
SetupConsoleBuild()
## Specify additional LOCATIOns of header files
include_directorIEs(
${AirsIM_ROOT}/GazeboDrone
${AirsIM_ROOT}/Airlib/include
${RPC_liB_INCLUDES}
${AirsIM_ROOT}/MavlinkCom/include
${AirsIM_ROOT}/MavlinkCom/common_utils
${GAZEBO_INCLUDE_Dirs}
)
AddExecutablesource()
CommonTargetlink()
target_link_librarIEs(${PROjeCt_name} Airlib)
target_link_librarIEs(${PROjeCt_name} ${RPC_liB})
target_link_librarIEs(${PROjeCt_name} ${GAZEBO_liBRARIES} pthread)
但我收到以下错误:
CMakefiles/GazeboDrone.dir/home/jonathan/Airsim/GazeboDrone/main.cpp.o: In function `main':
/home/jonathan/Airsim/GazeboDrone/main.cpp:117: undefined reference to `gazebo::transport::Node::Init(std::__1::basic_String<char,std::__1::char_Traits<char>,std::__1::allocator<char> > const&)'
CMakefiles/GazeboDrone.dir/home/jonathan/Airsim/GazeboDrone/main.cpp.o: In function `boost::shared_ptr<gazebo::transport::Subscriber> gazebo::transport::Node::Subscribe<gazebo::msgs::Posesstamped>(std::__1::basic_String<char,std::__1::allocator<char> > const&,voID (*)(boost::shared_ptr<gazebo::msgs::Posesstamped const> const&),bool)':
/usr/include/gazebo-9/gazebo/transport/Node.hh:235: undefined reference to `gazebo::transport::Node::Decodetopicname(std::__1::basic_String<char,std::__1::allocator<char> > const&)'
CMakefiles/GazeboDrone.dir/home/jonathan/Airsim/GazeboDrone/main.cpp.o: In function `gazebo::transport::CallBACkHelperT<gazebo::msgs::Posesstamped>::HandleData(std::__1::basic_String<char,boost::function<voID (unsigned int)>,unsigned int)':
/usr/include/gazebo-9/gazebo/transport/CallBACkHelper.hh:148: undefined reference to `Google::protobuf::messagelite::ParseFromString(std::__1::basic_String<char,std::__1::allocator<char> > const&)'
clang: error: linker command Failed with exit code 1 (use -v to see invocation)
如果有人可以帮助我,我很感激
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的cmake 未包含 Gazebo 依赖项全部内容,希望文章能够帮你解决cmake 未包含 Gazebo 依赖项所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。