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

Add Windows Compatibility Fixes for vision_opencv Build #538

Open
wants to merge 2 commits into
base: humble
Choose a base branch
from

Conversation

SENAI-GilmarCorreia
Copy link

Summary

This PR adds compatibility improvements to enable successful building of vision_opencv on Windows by introducing additional compiler options.

Changes Made

  1. Added Compiler Definitions for Windows Compatibility:

    • Added -DHAVE_SNPRINTF to add_compile_options to ensure that the snprintf function is available during compilation. This is a common requirement when building cross-platform code on Windows.
  2. Boost Python Library Static Linking on Windows:

    • For MSVC (Microsoft Visual C++), target_compile_definitions was updated with -DBOOST_PYTHON_STATIC_LIB. This option helps to statically link the Boost Python library, which is necessary for compatibility on Windows.

Rationale

These changes are specifically intended as a workaround to address issues encountered when building vision_opencv on Windows. By adding the snprintf definition and setting Boost Python for static linking, this PR aims to resolve common build issues related to cross-platform support.

Additional Notes

  • This PR only affects Windows builds and should not impact Linux-based systems.
  • These adjustments were tested on Windows using MSVC, and the build completed successfully after these changes.

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

Successfully merging this pull request may close these issues.

1 participant