:Blocks Can't compile application

This is my hello world code:

#include <stdio.h>
#include <stdlib.h>

int main()
printf("Hello world!\n");
return 0;

When I'm trying to run application I'm getting an error:

Target uses an invalid compiler; run aborted

So I went to Settings->Compiler->Toolchain Executables, and I selected C:\MinGW\bin, I have also tried C:\MinGW and I still get the same error.

I have installed


:Blocks with mingw from the official


:Blocks site.

Please help, I want start learning C but I can't...


You either have the wrong compiler selected in your project's build options OR you don't have executables set in your compiler settings.

To select your compiler in your project:

First, go to the Project menu and select Build options:

Then, in the Build options dialog, select the compiler you have set up as described in your question:

To change your compiler's executables:

Go to Settings and then Compiler:

Then select Toolchain Executables:

and fill in your executable names: