Chanson Shen
Chanson Shen

Reputation: 3

Why my dev-c++ "can't open output file"?

When I re-complied a .cpp file after crashing, my compiler told me this.

g:/program files (x86)/dev-cpp/mingw64/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\chanson\Desktop\quickSort.exe: Permission denied

collect2.exe: error: ld returned 1 exit status

Compilation failed after 1.00 seconds with errors

My system is win8.1, compiler is TDM-GCC 4.8.1 64-bit Release. I think it's the problem of my OS, but how can I fix this problem? Thanks a lot!

Upvotes: 0

Views: 13085

Answers (1)

Cheers and hth. - Alf
Cheers and hth. - Alf

Reputation: 145457

Usually the "permission denied" is because an instance of your program is still running.

You can use Task Manager to kill it.

Ctrl+Shift+Esc to run Task Manager, go to tab "Processes", find your process, kill it, but be careful. :)


Practical tip:

If you use the console subsystem for your app, at least while developing, then you can just run it from the command line, and kill it with Ctrl+C or Ctrl+Break.

Upvotes: 2

Related Questions