Fix Windows #defines—don't define WINDOWS or _WINDOWS, use predefined _WIN32 everywhere#224
Merged
Fix Windows #defines—don't define WINDOWS or _WINDOWS, use predefined _WIN32 everywhere#224
Conversation
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
jfpanisset
approved these changes
Nov 14, 2025
jfpanisset
left a comment
There was a problem hiding this comment.
Do you still need WIN32 and WIN64 symbols in .vcproj project files?
Outside of the .vcproj / .dsp project files, as far as I can tell those are still referenced in:
- HostSupport/include/ofxBinary.h line 9
- include/ofxCore.h line 25
- Examples/DrawSuite/drawsuite.cpp line 15
- Examples/Overlay/overlay.cpp line 15
- Examples/Custom/custom.cpp line 11
- cmake/OpenFX.cmake lines 6, 17
- Documentation/sources/Guide/Code/NMakefileCommon line 22
Of course it is possible that some of the OpenFX client code ends up depending on these WIN32 / WIN64 symbols, so you may end up having to keep defining them, but it would be preferable (?) if the OpenFX code just used the pre-defined _WIN32 symbol?
Contributor
Author
Ah, I should remove those too. Will do. |
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
jfpanisset
approved these changes
Nov 14, 2025
jfpanisset
left a comment
There was a problem hiding this comment.
Looks good, avoiding custom symbols that look like system defined ones is always good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
There's no need to have our own
WINDOWS#define; Windows always predefines_WIN32. Tested with our CMake/Conan build on Mac & Windows. This should clean things up in preparation for publishing a proper Conancenter recipe for OpenFX that doesn't cause users of the recipe to get WINDOWS definitions in their builds.