During first run of CB on Windows, this IDE detect automatically some compilers, or present one list of them pre-configured. It's very good functionnality, but, sometimes, you must "force" these ...
Quelques outils facilitant l'usage des outils de génération (aussi bien CB que CMAKE) - tools_tde/How config MSYS2 MinGW32_MinGW64 GCC C_C++ compiler into CodeBlocks.md at main · tdechaize/tools_tde ...