-
Notifications
You must be signed in to change notification settings - Fork 372
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
Using Unity builds results in compilation errors #262
Comments
Can we include windows here with |
Do not use #include on .cpp files, we do not support Unity/Jumbo builds. |
We can probably add the necessary defines (at least minmax…) although we need to be careful as they often are redefined at the project level which may cause macro redefinition warnings. That said, using an amalgamated build across multiple components (VM+Compiler) definitely isn’t guaranteed to work. |
i don't see any issue if you define at least macro redefinition warnings can be prevented by protecting macros by ifndef btw, like we did in the luaconf.h |
Just to double check, if you're using an amalgamated build you can also define NOMINMAX yourself, right? We have WIN32_LEAN_AND_MEAN defined everywhere except for lperf.cpp and TimeTrace.cpp so that's an omission we should correct, but to fully fix this problem we would have to add NOMINMAX to all 5 include locations in our source. |
Yes i could, but not very practical, it pushes requirements on the user. You will encounter the same issue with cmake unity build feature for example, or meson, if you plan to support it one day 😄 |
I can create a PR for you if you prefer. |
I'm hoping Meson doesn't default to unity builds; regardless this may be worth fixing. CMake Unity builds won't mix files across components although it might still result in an issue within Ast because of TimeTrace |
Yeah CMake Unity build doesn't build, but it doesn't build for a few reasons only one of which is the Windows.h conflation. I've reopened this issue as an enhancement - it's not a bug, and it's not clear that we should always support Unity builds as it changes the compilation model and it'll keep regressing, so we'll need to look at the changes necessary here separately. |
Getting these failures on windows machine on github actions:
see https://github.com/kunitoki/LuaBridge3/runs/4378619570?check_suite_focus=true
The text was updated successfully, but these errors were encountered: