How can I redirect the output of mingw64.exe to stdout?

323 Views Asked by At

I'm using mingw-w64, as provided by MSYS2, to compile an application for Windows with a Makefile. As part of this process, I need to run a configure script within MSYS2. I can execute it in Windows like so:

PS C:\Users\Jesse\TheProject> mingw64 ./configure --arguments

(The particular application I'm working with uses Makefiles for its build system plus a custom configure Bash script to configure some variables. However, it's fully cross-platform.)

However, I don't have access to the stdout of this process; MSYS2 opens what I believe is a mintty window, runs the command, and exits. I don't have any opportunity to parse the output, which I require for reasons beyond the scope of this post.

My question is: How can I make a command that's run via mingw64 redirect its output to stdout, or at least to a file? If I can't literally use mingw64.exe, what can I do that's close enough?

0

There are 0 best solutions below