Fix MSVC build errors: _countof undefined and duplicate macro redefinition#3
Closed
Fix MSVC build errors: _countof undefined and duplicate macro redefinition#3
Conversation
…cutor Co-authored-by: LoveDoLove <67772009+LoveDoLove@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add remote command tools for NT AUTHORITY privileges
Add SysExec: lightweight C++ NT AUTHORITY\SYSTEM / remote command executor
Mar 14, 2026
…vs /MTd Co-authored-by: LoveDoLove <67772009+LoveDoLove@users.noreply.github.com>
Copilot
AI
changed the title
Add SysExec: lightweight C++ NT AUTHORITY\SYSTEM / remote command executor
Fix MSVC Debug build: scope optimization flags to non-Debug configs only
Mar 15, 2026
…fines Co-authored-by: LoveDoLove <67772009+LoveDoLove@users.noreply.github.com>
Copilot
AI
changed the title
Fix MSVC Debug build: scope optimization flags to non-Debug configs only
Fix MSVC build errors: _countof undefined and duplicate macro redefinition
Mar 15, 2026
Copilot stopped work on behalf of
LoveDoLove due to an error
March 15, 2026 07:18
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.
Two independent MSVC build failures in
SysExec.cppwhen building with/WX:_countofnot found;<stdlib.h>(which defines it) was not included.WIN32_LEAN_AND_MEANand_WIN32_WINNTwere#defined in source but already injected by CMake'starget_compile_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600), causing macro redefinition warnings promoted to errors by/WX.Changes
SysExec.cpp— add#include <stdlib.h>for_countof; remove the two duplicate#definelines (macros are owned by CMake).CMakeLists.txt(prior fix) — scope/O2 /Oi /GLand/LTCGto non-Debug configs only to avoid incompatibility with CMake-injected/RTC1and/Odin Debug; fix/MT$<$<CONFIG:Debug>:d>→ proper per-config generator expressions.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.