update Windows build instructions and toolchain configuration
This commit is contained in:
2 files changed
+20
-6
No files matched your search
@@ -4,7 +4,9 @@
|
|||||||
"Bash(find:*)",
|
"Bash(find:*)",
|
||||||
"Bash(grep:*)",
|
"Bash(grep:*)",
|
||||||
"Bash(cmake:*)",
|
"Bash(cmake:*)",
|
||||||
"Bash(ctest:*)"
|
"Bash(ctest:*)",
|
||||||
|
"Bash(PATH=\"/c/msys64/mingw64/bin:$PATH\" \"C:/msys64/mingw64/bin/cmake.exe\":*",
|
||||||
|
"Bash(PATH=\"/c/msys64/mingw64/bin:$PATH\" \"C:/msys64/mingw64/bin/ninja.exe\":*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,15 +41,27 @@ See [README.md](README.md) for setup instructions, dependency installation, and
|
|||||||
|
|
||||||
### Windows Build Environment
|
### Windows Build Environment
|
||||||
|
|
||||||
**All build and test commands on Windows must be run in the MSYS2 MINGW64 shell** (`C:\msys64\mingw64`). This is the only shell where `cmake`, `ninja`, `gcc`, and all Qt/third-party libraries are on `PATH`. Do not use PowerShell, CMD, or the plain MSYS2 shell — they lack the correct toolchain and package prefix.
|
The toolchain is at `C:\msys64\mingw64\bin\`. Call binaries directly with full paths, but prepend `/c/msys64/mingw64/bin` to `PATH` so the compiler and its runtime DLLs are resolvable:
|
||||||
|
|
||||||
To run a command from Claude Code on Windows, invoke it via the MSYS2 MINGW64 bash:
|
|
||||||
```bash
|
```bash
|
||||||
/c/msys64/mingw64/bin/bash.exe -c "<command>"
|
# Configure
|
||||||
# or equivalently:
|
PATH="/c/msys64/mingw64/bin:$PATH" "C:/msys64/mingw64/bin/cmake.exe" \
|
||||||
C:/msys64/usr/bin/bash.exe -i -c "<command>"
|
-S . -B build -G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DCMAKE_MAKE_PROGRAM="C:/msys64/mingw64/bin/ninja.exe" \
|
||||||
|
-DCMAKE_C_COMPILER="C:/msys64/mingw64/bin/gcc.exe" \
|
||||||
|
-DCMAKE_CXX_COMPILER="C:/msys64/mingw64/bin/g++.exe" \
|
||||||
|
-DCMAKE_PREFIX_PATH="C:/msys64/mingw64"
|
||||||
|
|
||||||
|
# Build
|
||||||
|
PATH="/c/msys64/mingw64/bin:$PATH" "C:/msys64/mingw64/bin/ninja.exe" -C build
|
||||||
|
|
||||||
|
# Test
|
||||||
|
PATH="/c/msys64/mingw64/bin:$PATH" "C:/msys64/mingw64/bin/ctest.exe" --test-dir build --output-on-failure
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Use Unix-style paths (`/c/msys64/...`) for `PATH` assignments — Windows-style paths are not recognised by the shell.
|
||||||
|
|
||||||
## Test-Driven Development
|
## Test-Driven Development
|
||||||
|
|
||||||
**All new backend logic must be test-driven.** Follow the red-green-refactor cycle strictly:
|
**All new backend logic must be test-driven.** Follow the red-green-refactor cycle strictly:
|
||||||
|
|||||||
Reference in new issue
Block a user