diff --git a/README.md b/README.md index c6095454..0131f345 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ cmake --build --preset win-amd64-relwithdebinfo The executable is placed at `out/build/win-amd64-relwithdebinfo/ac6recomp.exe`. +On Windows, use the preset commands above rather than plain `cmake -L` in the repo root. If you previously configured from an `x86` Visual Studio prompt or with the wrong compiler on `PATH`, delete `out/build/win-amd64-relwithdebinfo` and re-run the preset from a normal 64-bit PowerShell/CMD window or an x64 Native Tools prompt. + ## Modding Docs - [Texture Swap Modding Guide](docs/TEXTURE_SWAP_MODDING_GUIDE.txt) diff --git a/setup_and_build.bat b/setup_and_build.bat index ebe6976c..68cedd5b 100644 --- a/setup_and_build.bat +++ b/setup_and_build.bat @@ -56,6 +56,26 @@ if !sdk_found! equ 0 ( echo [OK] All prerequisites found! echo. +echo ========================================= +echo Environment Check +echo ========================================= +if /I "%VSCMD_ARG_TGT_ARCH%"=="x86" ( + echo [ERROR] Detected an x86 Visual Studio developer environment. + echo This project must be configured from an x64 environment. + echo Close this shell and reopen a normal 64-bit PowerShell/CMD window, or use an x64 Native Tools prompt. + pause + exit /b 1 +) +if /I "%Platform%"=="x86" ( + echo [ERROR] Detected Platform=x86 in the current shell. + echo This project must be configured for a 64-bit target. + echo Close this shell and reopen a normal 64-bit PowerShell/CMD window, or use an x64 Native Tools prompt. + pause + exit /b 1 +) +echo [OK] No x86-only VS environment detected. +echo. + echo ========================================= echo Git Branch Check echo ========================================= diff --git a/thirdparty/rexglue-sdk/CMakeLists.txt b/thirdparty/rexglue-sdk/CMakeLists.txt index 6fdc0f0f..b76ad098 100644 --- a/thirdparty/rexglue-sdk/CMakeLists.txt +++ b/thirdparty/rexglue-sdk/CMakeLists.txt @@ -56,7 +56,12 @@ endif() # Enforce Clang18 compiler if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - message(FATAL_ERROR "ReXGlue requires Clang compiler. Please set CMAKE_CXX_COMPILER to clang++") + message(FATAL_ERROR + "ReXGlue requires Clang compiler.\n" + " Detected compiler ID: ${CMAKE_CXX_COMPILER_ID}\n" + " Detected compiler: ${CMAKE_CXX_COMPILER}\n" + " Hint: configure this repo with its CMake preset instead of plain 'cmake -L',\n" + " for example: cmake --preset win-amd64-relwithdebinfo") endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18.0")