-
Notifications
You must be signed in to change notification settings - Fork 27
'ros/ros.h' file not found clang-tidy(clang-diagnostic-error) #63
Comments
Are you using a |
Hi thanks for replying so quickly. I don't think so. Nothing in the ros documentation talks about a compile commands file but it's possible that this has been abstracted away from us by the Catkin tool. Also it should be noted that everything compiles with Catkin build normally with no errors. |
You need to either manually tell clang-tidy where to find your headers or have your build system generate a I'm not sure what build system you're using, but I know CMake can generate a According to the clang-tidy docs, it looks like you have to pass the include paths to clang itself. The provide the following example: I think you should be able to do this using the |
Thank you so much for the help. The way that our project is structured is that there are a number of cmake packages that all depend on ROS. Catkin goes through each of these packages and builds them using cmake and their cmake lists. Is there a way to programmatically set clang to look for these ROS headers for all of these packages ? For example, An environment variable I can tweak to get clang to look in the right places ? I will try what you have mentioned shortly when I get to work and I'll be sure to post back with the results. |
Other than |
I see this too even with a compile_commands.json file (which the ms cpp plugin picks up fine). |
Not 100% ideal, but I solved this by setting A good way to enable Thanks so much for this great extension! 😃 |
When working in a ROS Catkin workspace, intellisense is able to find all my header files, yet clang complains that it cannot find them. It does not complain about std headers such as vector or sstream but it cannot find ros specific header files.
My cpp properties are:
My settings.json is:
My user settings are as follows:
The text was updated successfully, but these errors were encountered: