Common steps :
- Install MSYS2-x86_64
- At the end of the installation, run it (either automatically or manually)
- Execute the command
pacman -Syu
to update core packages, then close the terminal when prompted - Run it again, and execute
pacman -Su
to update some more packages I will refer to the MSYS2 installation path asMSYS2_PATH
. By default it isc:/msys64
on 64-bits systems.
Run MSYS2 MinGW 32-bit
cd
(orpushd
) to the directory you cloned this repo to- Execute
pacman --needed -S mingw-w64-i686-toolchain mingw-w64-i686-qwt-qt5
(pacman will prompt about what packages to install, just press[enter]
) - Done!
To use this toolchain, point CMake to (MSYS2_PATH)/mingw32
(not needed with QtCreator, see instructions below)
Run MSYS2 MinGW 64-bit
cd
(orpushd
) to the directory you cloned this repo to- Execute
pacman --needed -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-qwt-qt5
(pacman will prompt about what packages to install, just press[enter]
) - Done!
To use this toolchain, point CMake to (MSYS2_PATH)/mingw64
(not needed with QtCreator, see instructions below)
- Open the "Build & Run" panel in QtCreator options
- In the "Qt Versions" tab, add a new one pointing to
(MSYS2_PATH)/mingw(32/64)/bin/qmake.exe
(usuallyC:\msys64\mingw64\bin\qmake.exe
) - In the "Compilers" tab, add a new one for MinGW C and C++, respectively pointing to
(MSYS2_PATH)/mingw(32/64)/bin/gcc.exe
and.../g++.exe
- In the "Debuggers" tab, add a new one pointing to
(MSYS2_PATH)/mingw(32/64)/bin/gdb.exe
- In the "CMake" tab, add a new one pointing to
(MSYS2_PATH)/mingw(32/64)/bin/cmake.exe
- In the "Kits" tab, add a new one where you use the compilers, debugger, qt and cmake defined above
- Select "CodeBlocks - Ninja" as CMake Generator
Thank you. I switched recently from VS Code to QtCreator and I forgot some basics. Even it could seem obvious, it's always useful to get such tutorial :-)
NB: After creating the kit, to set a build, you need to Enable the kit for the project..