undefined reference to YAML::LoadFile

后端 未结 5 611
梦如初夏
梦如初夏 2020-12-19 17:49

I\'m trying to use the new version of libyaml-cpp and having linker problems (undefined reference to \'YAML::LoadFile(std::basic_string

5条回答
  •  隐瞒了意图╮
    2020-12-19 18:22

    Support new yaml-cpp API.

    find_package(PkgConfig)
    pkg_check_modules(YAMLCPP REQUIRED yaml-cpp>=0.5)
    include_directories(${YAMLCPP_INCLUDE_DIRS})
    
    add_executable(name src/name.cpp)
    target_link_libraries(name ${catkin_LIBRARIES}  ${YAMLCPP_LIBRARIES})
    

提交回复
热议问题