Repository navigation
frontend: Include windows.h before shellapi.h in the obs-main Windows PCH - #2359
Merged
Merged
Conversation
… PCH #2176 moved obs-main's Windows startup into its own unity group and kept obs-app.cpp's include order, shellapi.h before windows.h. In obs-app.cpp an earlier header had already pulled in windows.h; in the new group nothing does, so shellapi.h sees no EXTERN_C or DECLSPEC_IMPORT and the Windows x64 app build fails (C2086/C2146 in shellapi.h, nightly run 40162888607). PR CI never builds the app, so only the nightly saw it.
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.
Fixes the Windows x64 app build on master (reported in #1395).
What
The nightly full run on bd029c8 (run 40162888607) fails
Build 🧱 / Windows 🪟 (x64)infrontend.windows-obs-main+.hpp.cpp:#2176 (2f28dc2) moved obs-main's Windows startup into its own unity group. Its PCH
frontend/build/frontend-windows-obs-main.pch.hppkeptobs-app.cpp's order,<shellapi.h>before<windows.h>. Inobs-app.cppan earlier header had already brought inwindows.h; in the new group nothing does, soshellapi.his parsed withoutEXTERN_C/DECLSPEC_IMPORT. The nightly passed on 56732d6 (10-24 04:38, before #2176) and fails on the next one.Fix
Include
<windows.h>(withWIN32_LEAN_AND_MEAN) before<shellapi.h>. No source or behaviour change.Verification
workflow_dispatchfull run. The new order matchesfrontend-windows-autoupdatethread.pch.hpp. (frontend-windows-platform.pch.hppalso listsshellapi.hfirst, but an earlier include there already brings inwindows.h, so it builds.)./lintpasses.The other two failures in that nightly (
canonical_remux_queue_runs_unchangedon macOS/Windows) were fixed by #2355. Build-only, so no features-ledger line.