From d92ef2f71de0541346f3ed45272e91bd9738a09c Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 27 Oct 2024 12:38:23 +1300 Subject: [PATCH] doc/README: add build test notes for Qt6 on Windows MSYS2 --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aca8488a..5d93176a 100644 --- a/README.md +++ b/README.md @@ -171,13 +171,20 @@ $env:CGO_CXXFLAGS = '-Wno-ignored-attributes -D_Bool=bool' # Clang 18 recommenda ### Windows (MSYS2) -*Tested with MSYS2 UCRT64 Qt 5.15 / GCC 14* +*Tested with MSYS2 UCRT64 Qt 5.15 / Qt 6.7 / GCC 14* For dynamic linking: ```bash -pacman -S mingw-w64-ucrt-x86_64-{go,gcc,qt5-base,pkg-config} -GOROOT=/ucrt64/lib/go go build -ldflags "-s -w -H windowsgui" +# Install Go and C++ toolchains +pacman -S mingw-w64-ucrt-x86_64-{go,gcc,pkg-config} +export GOROOT=/ucrt64/lib/go # Needed only if this is the first time installing Go in MSYS2. Otherwise it would be automatically applied when opening a new Bash terminal. + +# Install Qt +pacman -S mingw-w64-ucrt-x86_64-qt5-base # For Qt 5 +pacman -S mingw-w64-ucrt-x86_64-qt6-base # For Qt 6 + +go build -ldflags "-s -w -H windowsgui" ``` - Note: the MSYS2 `qt5-base` package [links against `libicu`](https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-qt5-base/PKGBUILD#L241), whereas the Fsu0413 Qt packages do not. When using MSYS2, your distribution size including `.dll` files will be larger.