I am a teacher\'s assistant for a C programming class, and the instructor uses Dev C++ as the compiler for the class. Personally I would use a different one, but the choice
Please tell your teacher to update Dev-C++ instead:
http://sourceforge.net/projects/orwelldevcpp/?source=directory
This one ships with a working MinGW 4.7 or a TDM-GCC 4.6.1 (x64) compiler, fixes endless amounts of bugs, and is also portable.
I received the same error, but was able to get around it by doing the following.
I believe that Dev-C++ comes with a very old version of MinGW (3.4.x if I'm not mistaken). MinGW versions before 4.2.2 will have problems compiling programs on Windows Vista and later unless they are on the PATH.
So you can either update your version of MinGW (as you mentioned in a comment that you have already done), or you can add the MinGW\bin directory to the system path.
If you cannot change your MINGW version, you can try to rename the following file : MinGW\libexec\gcc\mingw32\3.4.2\collect2.exe to collect2.exe.old
(this solution worked after a migration from W7 to W10).
I used MinGW Installation Manager to download the last version of C Compiler (5.3.0-3 at this moment) and I repliced the files in the folder of Dev-Cpp. Now, its working perfectly in my Windows 10.