title: Compiling gflags library using Bazel and Mingw
body: <p>I am using MSYS2 on Windows 10. I installed <a href="https://packages.msys2.org/package/mingw-w64-x86_64-gcc" rel="nofollow noreferrer">mingw-w64-x86_64-gcc</a> into my MSYS2 environment.</p>
  <p>Now I try to build the <code>gflags</code> library using Bazel and MinGW.</p>
  <pre><code>git clone https://github.com/gflags/gflags.git
  cd gflags
  bazel build --compiler=mingw-gcc //...
  </code></pre>
  <p>I get the following error:</p>
  <pre><code>ERROR: G:/dev/gflags/BUILD:16:30: Action gflags_declare.h failed: (Exit -1073741515): expand_template.exe failed: error executing command bazel-out/host/bin/bazel/expanded_template/expand_template.exe --template src/gflags_declare.h.in --output bazel-out/x64_windows-fastbuild/bin/gflags_declare.h @GFLAGS_NAMESPACE@;gflags ... (remaining 2 argument(s) skipped
  </code></pre>
  <p>It seems that something goes wrong when <a href="https://github.com/gflags/gflags/blob/master/bazel/expanded_template/expand_template.cc" rel="nofollow noreferrer"><code>expand_template</code></a> is executed. But I have no idea why. Does anyone have some ideas or hints what`s the problem here?</p>