Fix native Windows MSVC build compatibility - #131
Merged
Merged
Conversation
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.
This PR fixes the native Windows MSVC x64 Debug build on my end. I know the SDL3 migration is still in progress, so feel free to simply close this PR if equivalent fixes already exist in your pending work. The tested changes are here for reference.
The changes address compatibility issues without disabling security checks or suppressing runtime-library warnings.
Changes
CGT2Favorites.cppby first assigning each proxy to anHjson::Value(C2440).SYS_Win32GetAvailableDrivesPathsinCViewFileBrowser.cpp. Your newer header-order fix is retained; I've dropped our overlapping include-path change./utf-8; the byte-preserving escapes let Windows-based contributors use either compiler.msvcrtd.lib/msvcrt.libentries from configurations already using the static runtime. This clears LNK4098 and removes the unwanted Debug runtime DLL imports._InterlockedExchangefor the IDE64 lock when building with MSVC, which doesn't provide the__syncbuilt-ins. GCC and Clang, including ClangCL, keep their existing path. The lock's call sites and protected code are unchanged.No unrelated refactoring, GUI/MCP startup changes, or logging changes are included.
Testing
Built from a Visual Studio 2026 developer shell:
The build and link succeeded without mixed-runtime warnings; other compiler warnings remain. The final executable opened with a fresh settings directory, responded to menus, and closed with exit code 0. The settings override was verified in the runtime log. I also checked the executable's DLL imports and verified that the VICE escapes preserve the original bytes.
The IDE64 listener test reached its connection check but crashed during detach/reset cleanup. I haven't established whether that's related to the MSVC change; the log and symbolized crash report are preserved. No runtime fix for that crash is included here.
For the GUI check, I temporarily moved the legacy
LogConsole.exeaside and restored it afterward because it requests .NET Framework 3.5 on this machine. That separate helper requirement is unchanged.I've only built and run x64 MSVC Debug. The project edits also cover Release and ARM64, but those configurations and the full cross-platform CI matrix still need checking.
Tested on RetroDebugger
fba993da55b596d4dc05ce05289a1d9aa01c0b7fand MTEngineSDL0d40eb9807f1b5b90586fa0673fbedf63e4936c6, with these application changes and the separate two-line libpng fix in the engine checkout.Companion engine fix: slajerek/MTEngineSDL#9