I was getting this error message, because I was using MinGW-w64, and the commands in <install path>\bin
all had a weird prefix. I attempted to call executables in the "target alias" directories instead of in <install path>\bin
directories, which resulted in even more problems. That's a no-no according to the FAQ. The solution for me, then, was to create symbolic links to all the prefixed commands. I opened an elevated command prompt and used something like mklink gcc.exe x86_64-w64-mingw32-gcc.exe
for every executable, and now my build works.