Following instructions here:
https://docs.epics-controls.org/projects/how-tos/en/latest/getting-started/installation-windows-msys2.html
in order to build EPICS base on Windows, using MSYS2 (x64) & mingw (x64).
Build failed looking for <direct.h>
The problem was that compiler being used was
/usr/bin/gcc.exe
instead of
/mingw64/bin/gcc.exe
I solved the problem by prepending /mingw64/bin: to $PATH in my ~/.bashrc,
which wasn't part of the $PATH in the default install.
That setting is done when you open the terminal through the appropriate links called "MSYS MinGW 64-bit" or "MSYS MinGW 32-bit".
If you use the generic terminal, you get the settings for the common MSYS layer, including the compiler that the common layer is built with.
The instructions you are referring to say: