I was encountering a similar error earlier today. I'm using the technological preview of mingw, so my gcc file name was called, gcc-sjlj.exe / g++-sjlj.exe. I created copies of these files, and renamed them to gcc.exe and g++.exe and that error went away.
I came across another error [unrelated], but I won't hijack your thread with that.