鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    在入门篇第2章1.2.2使用终极命令后还报错

    已定时 已固定 已锁定 已移动
    ROS2机器人开发:从入门到实践
    终极命令后报错 入门篇第2章1.2.2
    3
    5
    494
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 2
      254944954
      最后由 编辑

      使用终极命令:
      sudo g++ -o first_ros2_node first_ros2_node.cpp -I/opt/ros/humble/include/rclcpp/ -I /opt/ros/humble/include/rcl/ -I /opt/ros/humble/include/rcutils/ -I /opt/ros/humble/include/rmw -I /opt/ros/humble/include/rcl_yaml_param_parser/ -I /opt/ros/humble/include/rosidl_runtime_c -I /opt/ros/humble/include/rosidl_typesupport_interface -I /opt/ros/humble/include/rcpputils -I /opt/ros/humble/include/builtin_interfaces -I /opt/ros/humble/include/rosidl_runtime_cpp -I /opt/ros/humble/include/tracetools -I /opt/ros/humble/include/rcl_interfaces -I /opt/ros/humble/include/libstatistics_collector -I /opt/ros/humble/include/statistics_msgs -L /opt/ros/humble/lib/ -lrclcpp -lrcutils
      出现报错;

      报错如下:
      /usr/bin/ld: warning: liblibstatistics_collector.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librcl.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librcl_interfaces__rosidl_typesupport_cpp.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librcl_yaml_param_parser.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librosgraph_msgs__rosidl_typesupport_cpp.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: libstatistics_msgs__rosidl_typesupport_cpp.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: libtracetools.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librmw_implementation.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: libament_index_cpp.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librcl_logging_interface.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librmw.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: librcpputils.so, needed by /opt/ros/humble/lib//librclcpp.so, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_durability_policy_from_str' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_call'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_serialize' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_service_names_and_types'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_is_ready' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_publisher_names_and_types_by_node'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_init_options_get_allocator' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_set_on_new_message_callback'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_timer_link_node' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_network_flow_endpoints'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_disable_ros_time_override' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_subscription_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_init_options_copy' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_set_content_filter'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_reliability_policy_to_str' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_take_event'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_context' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_take_request'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to libstatistics_collector::collector::GenerateStatisticMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, builtin_interfaces::msg::Time_<std::allocator<void> >, builtin_interfaces::msg::Time_<std::allocator<void> >, libstatistics_collector::moving_average_statistics::StatisticData const&)' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_clock_add_jump_callback' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_resolve_name'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_clear' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_logging_multiple_output_handler'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_timer' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_assert_liveliness'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_clock_init' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_timer_callback_added'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_guard_condition_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_event_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_event_set_callback' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_client_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_yaml_node_struct_init' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_get_namespace'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_service_callback_added' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_client_set_on_new_response_callback'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcpputils::path_for_library(std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_clock_get_now' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_reliability_policy_from_str'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_names_and_types_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_take_serialized_message'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_options' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to vtable for libstatistics_collector::moving_average_statistics::MovingAverageStatistics'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_request_subscription_get_actual_qos' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_validate_namespace'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to libstatistics_collector::collector::Collector::ClearCurrentMeasurements()' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_get_fully_qualified_name'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_init' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_node_names'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_options_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<rcl_interfaces::srv::SetParameters>()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_publisher' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<rcl_interfaces::srv::DescribeParameters>()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_guard_condition_get_default_options' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_can_loan_messages'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publish_loaned_message' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_init_options_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_enable_ros_time_override' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_get_actual_qos'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_parse_arguments' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_arguments_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_client_names_and_types_by_node' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ament_index_cpp::get_package_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_executor_get_next_ready'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcpputils::SharedLibrary::SharedLibrary(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_return_loaned_message_from_subscription'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_remove_ros_arguments' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_can_loan_messages'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_arguments_get_unparsed_ros' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<statistics_msgs::msg::MetricsMessage
      <std::allocator<void> > >()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_is_cft_enabled' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_get_default_options'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_subscriptions_info_by_topic' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_topic_name_validation_result_string'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_trigger_guard_condition' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_init_options_get_domain_id'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_history_policy_from_str' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_clock_remove_jump_callback'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_get_topic_name' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_get_default_options'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_get_publisher_count' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_event_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_init_options' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_subscription'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_subscriber_names_and_types_by_node' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_callback_register'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to libstatistics_collector::collector::Collector::AcceptData(double)' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_logging_configure_with_output_handler'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_get_zero_initialized_network_flow_endpoint_array' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_set_ros_time_override'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_get_content_filter' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_take'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_node_name_validation_result_string' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_service'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<rcl_interfaces::msg::ParameterEvent_<std::allocator<void> > >()' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_count_publishers'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_borrow_loaned_message' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_client_response_subscription_get_actual_qos'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_get_name' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_content_filter_options_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<rcl_interfaces::srv::GetParameterTypes>()' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_clock_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to vtable for rcpputils::IllegalStateException' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_publish'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_wait_set' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_event_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_logging_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcpputils::IllegalStateException::IllegalStateException(char const*)'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_add_service' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_validate_topic_name' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_resize'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_actual_qos' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_add_guard_condition'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_arguments_get_param_overrides' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<rcl_interfaces::srv::ListParameters>()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_get_zero_initialized_topic_endpoint_info_array' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_validate_node_name'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_init' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_is_valid_except_context'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_init_options_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_default_topic_name_substitutions'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_context_get_domain_id' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_context_is_valid' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to typeinfo for rcpputils::IllegalStateException'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_add_event' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_publishers_info_by_topic'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_send_request' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_arguments_get_count_unparsed_ros'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_subscription_content_filter_options' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<rcl_interfaces::srv::GetParameters>()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_callback_start' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_remap_topic_name'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_durability_policy_to_str' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_context'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_network_flow_endpoint_array_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_get_default_options'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_parse_yaml_file' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_get_options'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_get_gid_for_publisher' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_network_flow_endpoint_get_internet_protocol_string'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_get_zero_initialized_names_and_types' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to tracetools::detail::get_symbol_funcptr(void*)'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_init' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_shutdown'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_clock_valid' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_full_topic_name_validation_result_string'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_node_names_with_enclaves' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_topic_names_and_types'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<rcl_interfaces::msg::SetParametersResult_<std::allocator<void> > >()' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<rcl_interfaces::msg::ListParametersResult
      <std::allocator<void> > >()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to libstatistics_collector::collector::Collector::Start()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_context_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_topic_endpoint_info_array_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_service_type_support_t const* rosidl_typesupport_cpp::get_service_type_support_handle<rcl_interfaces::srv::SetParametersAtomically>()' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_compare_gids_equal'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_init' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_event'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_content_filter_options_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_client'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_yaml_node_struct_fini' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_liveliness_policy_to_str'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to tracetools::detail::demangle_symbol(char const*)'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_get_service_name' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_expand_topic_name'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_node' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<rosgraph_msgs::msg::Clock
      <std::allocator<void> > >()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_arguments' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcpputils::fs::path::path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_send_response' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_init_options_set_domain_id'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_clock_time_started' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_rmw_handle'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_policy_kind_to_str' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publish_serialized_message'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_topic_name' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_take_response'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_validate_full_topic_name' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_profile_check_compatible'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_network_flow_endpoint_get_transport_protocol_string' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_get_graph_guard_condition'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_logging_get_logging_directory' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_get_time_until_next_call'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_client_request_publisher_get_actual_qos' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcpputils::SharedLibrary::get_symbol(std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to libstatistics_collector::collector::Collector::GetStatisticsResults() const' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_executor_execute'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_take_loaned_message' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_get_network_flow_endpoints'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_reset' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_subscription_callback_added' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_fini'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_set_on_new_request_callback' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_server_is_available'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_is_enabled_ros_time_override' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_client_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_is_canceled' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_callback_end'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_liveliness_policy_from_str' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_client_get_service_name'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_count_subscribers' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<rcl_interfaces::msg::ParameterDescriptor
      <std::allocator<void> > >()'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_add_timer' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_add_client'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to typeinfo for ament_index_cpp::PackageNotFoundError' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_subscription_options_set_content_filter_options'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_namespace_validation_result_string' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_deserialize'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_service_names_and_types_by_node' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rmw_qos_history_policy_to_str'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publish' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_take'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_default_options' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to libstatistics_collector::collector::Collector::GetStatusStringabi:cxx11 const'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_zero_initialized_guard_condition' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_guard_condition_init'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_node_get_logger_name' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to ros_trace_rclcpp_executor_wait_for_work'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_get_default_domain_id' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_wait_set_add_subscription'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_init' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_service_response_publisher_get_actual_qos'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_timer_cancel' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to typeinfo for libstatistics_collector::collector::Collector'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to libstatistics_collector::collector::Collector::Stop()' /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to rcl_publisher_get_subscription_count'
      /usr/bin/ld: /opt/ros/humble/lib//librclcpp.so: undefined reference to `rcl_client_get_default_options'
      collect2: error: ld returned 1 exit status

      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小鱼小
        小鱼 技术大佬 @254944954
        最后由 编辑

        @254944954 跳过跳过看新教程

        新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

        2 2 条回复 最后回复 回复 引用 0
        • 2
          254944954 @小鱼
          最后由 编辑

          @小鱼 跳过使用后面的make方法,结果也一样,Cmake也不成功

          1 条回复 最后回复 回复 引用 0
          • 2
            254944954 @小鱼
            最后由 编辑

            @小鱼 已解决了

            1 1 条回复 最后回复 回复 引用 0
            • 1
              1790815185 @254944954
              最后由 编辑

              @254944954 大佬 请问是啥原因啊 我也有您这个问题

              1 条回复 最后回复 回复 引用 0
              • 第一个帖子
                最后一个帖子
              皖ICP备16016415号-7
              Powered by NodeBB | 鱼香ROS