Skip to content

Build the native lifetime test with MSVC - #45

Merged
Dsssyc merged 1 commit into
mainfrom
socu/fix-windows-lifetime-test
Oct 29, 2026
Merged

Dsssyc merged 1 commit into
mainfrom
socu/fix-windows-lifetime-test

Conversation

@Dsssyc

@Dsssyc Dsssyc commented Oct 29, 2026

Copy link
Copy Markdown
Member

Release Artifacts for the 0.2.4 merge (run 40926228094) failed on both native Windows jobs (x64 and ARM64) while compiling tests/cpp/test_legacy_lifetime.cpp, which was added in PR #43:

rpcndr.h(203): error C2872: 'byte': ambiguous symbol

The test includes private Core headers that use namespace std before windows.h. The full windows.h then declares the RPC byte typedef, which MSVC reports as ambiguous with std::byte. The test only needs the virtual memory API, so it now defines WIN32_LEAN_AND_MEAN before including windows.h.

The change is inside #ifdef _WIN32, so macOS and Linux builds are unchanged. Pull request CI does not build native Windows targets; the Windows compile and the legacy.lifetime test run in Release Artifacts after this merges to main. 0.2.4 is tagged only after that run passes.

The lifetime test includes private Core headers that use namespace std before
windows.h. The full windows.h then declares the RPC byte typedef, which MSVC
reports as ambiguous with std::byte, so both native Windows jobs of Release
Artifacts failed to compile the test. Define WIN32_LEAN_AND_MEAN; the test
only needs the virtual memory API.
@Dsssyc
Dsssyc merged commit f82fa13 into main Oct 29, 2026
21 checks passed
@Dsssyc
Dsssyc deleted the socu/fix-windows-lifetime-test branch October 29, 2026 19:44
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