title: MinGw compiler errror - collect2.exe: error: ld returned 1 exit status
body: <p>I'm trying to compile c++ in <strong>Sublime text</strong>. I've managed to install the the relevant packages for the <strong>MinGw</strong> on my computer. As well as creating a path file in the System environment variables under the directory <strong>C:\MinGW\bin</strong>, its exact location. And subsequently generated a new build system in the editor, containg  the fallowing:</p>
  <pre><code>{
  &quot;cmd&quot; : &quot;gcc $file_name -o ${file_base_name} &amp;&amp; ${file_base_name}&quot;,
  &quot;selector&quot; : &quot;source.c&quot;,
  &quot;shell&quot;: true,
  &quot;working_dir&quot; : &quot;$file_path&quot;
  }
  </code></pre>
  <p>I went further to check in cmd  if my installation of the compiler was done properly, and it was.</p>
  <pre><code>&gt;gcc --version
  gcc (MinGW.org GCC Build-2) 9.2.0
  Copyright (C) 2019 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  </code></pre>
  <p>I typed in sublime this code:</p>
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  int main(){
      cout&lt;&lt;&quot;hello world&quot;;
  }
  </code></pre>
  <p>The compiled result was this :</p>
  <pre><code>c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\44750\AppData\Local\Temp\ccVYP6T2.o:item.cpp:(.text+0x19): undefined reference to `std::cout'
  c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\44750\AppData\Local\Temp\ccVYP6T2.o:item.cpp:(.text+0x1e): undefined reference to `std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp; std::operator&lt;&lt; &lt;std::char_traits&lt;char&gt; &gt;(std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, char const*)'
  c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\44750\AppData\Local\Temp\ccVYP6T2.o:item.cpp:(.text+0x35): undefined reference to `std::ios_base::Init::~Init()'
  c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\44750\AppData\Local\Temp\ccVYP6T2.o:item.cpp:(.text+0x56): undefined reference to `std::ios_base::Init::Init()'
  collect2.exe: error: ld returned 1 exit status
  [Finished in 0.8s]
  </code></pre>