The installed version defaults to x86_64-pc-windows-msvc, where the msvc at the end suggests it is looking for MSVC headers.
If you specify x86_64-w64-mingw32 as target, it uses the mingw-w64 headers.
The installed version defaults to x86_64-pc-windows-msvc, where the msvc at the end suggests it is looking for MSVC headers.
If you specify x86_64-w64-mingw32 as target, it uses the mingw-w64 headers.