-
Notifications
You must be signed in to change notification settings - Fork 125
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
Consider narrowing the scope of #undef ERROR
in generated message code
#118
Comments
This is a known problem that we face is ROS1 as well (e.g. ros/geometry2#172) and it would be great to see how we can address these collisions with Windows defined in the near future |
This issue has come up again here: The generated file build\tf2_msgs\rosidl_generator_cpp\tf2_msgs\msg\tf2_error__struct.hpp contains the following code that conflicts with Windows' definition:
Windows SDK defines macro NO_ERROR in Error.h:
We have confirmed for myself that that culprit is Windows SDK. On a clean installation everything works OK but as soon as we installed Windows SDK the build fails in TF2 (now it fails in Release build too). @wjwwood says: |
This is also an issue with 'DELETE' defined in winnt.h: ros2/common_interfaces#44 We'll either need some way to generically protect ourselves from some known set of conflicting strings or else have a blacklist of known strings that must be banned due to windows bad hygene in macro names. Might it make sense to have a known set of potentially colliding macros that automatically get undefed in our code generators if a conflict is detected? |
Options:
|
Related: ros2/design#172 |
d4264b7#commitcomment-17146232
The text was updated successfully, but these errors were encountered: