Skip to content
New issue

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

[ament_cppcheck] Unable to resolve macro definitions from includes #116

Closed
jacobperron opened this issue Dec 18, 2018 · 0 comments
Closed
Assignees

Comments

@jacobperron
Copy link
Contributor

jacobperron commented Dec 18, 2018

With the latest release of cppcheck (v1.86), tests have started failing in rclcpp with the following error message (or very similar):

There is an unknown macro here somewhere. Configuration is required. If RCLCPP_SMART_PTR_DEFINITIONS is a macro then please configure it.

Example build: https://ci.ros2.org/view/All/job/test_ci_osx/118/


I don't believe this is an error in rclcpp itself, but with how cppcheck is invoked.
If cppcheck is invoked with the -I option, passing the include directory, then the error goes away.
E.g.

cppcheck -I rclcpp/rclcpp/include  rclcpp/rclcpp/include/rclcpp/client.hpp

Documentation for the -I option:

    -I <dir>             Give path to search for include files. Give several -I
                         parameters to give several paths. First given path is
                         searched for contained header files first. If paths are
                         relative to source files, this is not needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant