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

Suppress dll-interface warnings (C4251) on windows #1108

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Feb 14, 2025

🦟 Bug fix

Fixes #1106

Summary

Suppress C4251 warnings on windows.

Example warning msgs:

'gz::rendering::v8::Ogre2DynamicRenderable::dataPtr': class 'std::unique_ptr>' needs to have dll-interface to be used by clients of class 'gz::rendering::v8::Ogre2DynamicRenderable'

The warnings are emitted when there are STL typed objects declared in header classes. The reason for this warning is explained here, specifically:

...emitted when you use a non-dllexported class X in a dllexported class Y

This is no longer an issue in gz-rendering9 windows builds as I believe that's because visibility changed to hidden by default. So suppressing the warnings in gz-rendering8 / harmonic.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Feb 14, 2025
@iche033 iche033 merged commit b7a9a47 into gz-rendering8 Feb 14, 2025
10 of 11 checks passed
@iche033 iche033 deleted the suppress_c4251 branch February 14, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants