title: Compiling C++ project from powershell is not working
body: <p>I am programming a chess engine with 2 friends and it is getting very strong (above 3000 Elo).
  We have written the code in C++ and compile using make. For some reason the normal installer for MinGW did not do what it was supposed to so I went with msys2 and installed all the requires packages using msys2.</p>
  <p>I am not familiar with compiling C++ under windows and here is the problem:</p>
  <p>When I compile the program using the Git Bash or powershell, it compiles nicely (except for a few warnings) using: <code>make native</code></p>
  <p><a href="https://i.stack.imgur.com/EJxjH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EJxjH.png" alt="enter image description here" /></a></p>
  <p>The issue is the way I need to execute the program:</p>
  <ul>
  <li>It does not work if I run using powershell or cmd</li>
  <li>It does not work if I double click it (see the error message below)</li>
  <li>It does only work if invoked from a bash</li>
  </ul>
  <p><a href="https://i.stack.imgur.com/Hk5m0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hk5m0.png" alt="enter image description here" /></a></p>
  <p>If you are not familiar with german, this is a rough translation:</p>
  <pre><code>The procedure entry point &quot;...&quot; was not found in the DLL &quot;...&quot;
  </code></pre>
  <hr />
  <p>We have provided a makefile which can build different versions (native, release (for multiple hardwares)). Running a non-native version like <code>Koivisto_3.9-x64-windows-popcnt-avx.exe</code> does run  by simply double clicking it.</p>
  <p>Also the file sizes are very different:</p>
  <ul>
  <li>native: <code>600kb</code></li>
  <li>non-native: <code>3100kb</code></li>
  </ul>
  <p>The entire project is on github: <a href="https://github.com/Luecx/Koivisto" rel="nofollow noreferrer">Koivisto Chess Engine</a></p>
  <p>And the makefile can be found here: <a href="https://github.com/Luecx/Koivisto/blob/master/src_files/makefile" rel="nofollow noreferrer">Makefile</a></p>
  <hr />
  <p>I wonder why there seems to be that difference and why the native version only runs within a bash. I am very happy if someone could explain this behaviour to me and potentially even tell me a way to fix this.</p>
  <p>I am very happy for any advice!</p>
  <p>Greetings,
  Finn</p>