title: Why code::blocks shows problem during compilation of C++ file
body: <p>I installed code::blocks before but I have never encountered a problem during the execution of a hello world program, which everyone must be familiar of. Today, I installed code::blocks along with GNU compiler and added it to PATH (environment variable). Everything seems right, but when I run the below code, it showed an error:</p>
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; &quot;Hello world!&quot; &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  <p>(I build and run the code and the messages are as follows)</p>
  <pre><code>Project/Target: &quot;FileTest - Debug&quot;:
    The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
    Probably the toolchain path within the compiler options is not setup correctly?!
    Do you have a compiler installed?
  Goto &quot;Settings-&gt;Compiler...-&gt;Global compiler settings-&gt;GNU GCC Compiler-&gt;Toolchain executables&quot; and fix the compiler's setup.
  
  Tried to run compiler executable 'C:\MinGW/bin/gcc.exe', but failed!
  
  Skipping...
  Nothing to be done (all items are up-to-date).
  </code></pre>
  <p>I don't quite know what this log meant. I installed MinGW and when I went to <strong>Settings / Compiler</strong>, it just showed that I am using MinGW. Everything seems right.</p>
  <p>Here is a screenshot from my editor:
  <a href="https://i.stack.imgur.com/xdKCT.png" rel="nofollow noreferrer">https://i.stack.imgur.com/xdKCT.png</a>.
  Anyone help me?</p>