From bb16e953a70501fc64af27d67d967d3e2ce717c7 Mon Sep 17 00:00:00 2001 From: itsRevela Date: Mon, 23 Mar 2026 11:30:31 -0500 Subject: [PATCH] Fix CMake build configuration for Windows64 platform - Add #include to extraX64.h for Windows type definitions - Remove duplicate byte typedef and suppress std::byte via _HAS_STD_BYTE=0 - Define _WINDOWS64 for correct platform header selection - Set IGGY_LIBS to iggy_w64.lib for proper Iggy UI library linking --- CMakeLists.txt | 5 +++++ Minecraft.World/x64headers/extraX64.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63071a0e..276c3b98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,9 +68,14 @@ set(MINECRAFT_SHARED_DEFINES $<$:_DEBUG> _CRT_NON_CONFORMING_SWPRINTFS _CRT_SECURE_NO_WARNINGS + _HAS_STD_BYTE=0 ) # Add platform-specific defines +if(PLATFORM_NAME STREQUAL "Windows64") + list(APPEND MINECRAFT_SHARED_DEFINES _WINDOWS64) + set(IGGY_LIBS iggy_w64.lib) +endif() list(APPEND MINECRAFT_SHARED_DEFINES ${PLATFORM_DEFINES}) # --- diff --git a/Minecraft.World/x64headers/extraX64.h b/Minecraft.World/x64headers/extraX64.h index 4af047b5..823d593c 100644 --- a/Minecraft.World/x64headers/extraX64.h +++ b/Minecraft.World/x64headers/extraX64.h @@ -3,6 +3,7 @@ #include #include #include +#include #include "..\..\Minecraft.Client\SkinBox.h" @@ -11,7 +12,8 @@ #define MULTITHREAD_ENABLE -typedef unsigned char byte; +// byte is already defined by rpcndr.h (via windows.h) +// std::byte is suppressed via _HAS_STD_BYTE=0 in CMakeLists.txt const int XUSER_INDEX_ANY = 255; const int XUSER_INDEX_FOCUS = 254;