We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am writing my own plugin for the diagnostic and I needed to call StatusItem::toStatusMsg https://github.com/ros/diagnostics/blob/galactic/diagnostic_aggregator/include/diagnostic_aggregator/status_item.hpp#L222-L224
StatusItem::toStatusMsg
I was getting a linking error:
/usr/bin/ld: libas_monitor_analyzers_lib.so: undefined reference to `diagnostic_aggregator::StatusItem::toStatusMsg(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool) const' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/as_monitor_analyzers_test.dir/build.make:210: as_monitor_analyzers_test] Error 1 make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/as_monitor_analyzers_test.dir/all] Error 2 make: *** [Makefile:141: all] Error 2
The issue is that CMake does not export the diagnostic_aggregator library: https://github.com/ros/diagnostics/blob/galactic/diagnostic_aggregator/CMakeLists.txt#L158-L164
It should look like this:
ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET) ament_export_libraries(${PROJECT_NAME})
Is it by design?
The text was updated successfully, but these errors were encountered:
This PR added that line for ament_export_targets. ament_export_libraries is not needed if you use ament_export_targets according to this.
ament_export_targets
ament_export_libraries
I think this issue can be closed.
Sorry, something went wrong.
I agree. I think we can close this
No branches or pull requests
I am writing my own plugin for the diagnostic and I needed to call
StatusItem::toStatusMsg
https://github.com/ros/diagnostics/blob/galactic/diagnostic_aggregator/include/diagnostic_aggregator/status_item.hpp#L222-L224I was getting a linking error:
The issue is that CMake does not export the diagnostic_aggregator library: https://github.com/ros/diagnostics/blob/galactic/diagnostic_aggregator/CMakeLists.txt#L158-L164
It should look like this:
Is it by design?
The text was updated successfully, but these errors were encountered: