Decide what compiler you wish to use!
Install that compiler if needed; Code::Blocks IDE is not an compiler.
Set the default toolchain to match the chosen compiler.
Settings -> Compiler...
Select the Compiler in the pulldown
Click on the "Set as Default" button.
Verify the "Toolchain Executables"
Tim S.