Add Windows Compatibility Fixes for vision_opencv Build #538
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds compatibility improvements to enable successful building of
vision_opencv
on Windows by introducing additional compiler options.Changes Made
Added Compiler Definitions for Windows Compatibility:
-DHAVE_SNPRINTF
toadd_compile_options
to ensure that thesnprintf
function is available during compilation. This is a common requirement when building cross-platform code on Windows.Boost Python Library Static Linking on Windows:
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 thesnprintf
definition and setting Boost Python for static linking, this PR aims to resolve common build issues related to cross-platform support.Additional Notes