ldming

ld.exe, final link failed: Permission denied - write access: yes, process still running: no


I have a strange error. It popped out of nowhere. I was happily building (Eclipse + MingW) and suddenly on one build I got this message

c:/mingw/mingw32/bin/ld.exe: final link failed: Permission denied

Normally this happens in these two cases:

Both cases are false in my case (doubled checked both on every occurance of the error, and I compiled several times before already without problems, without leaving Eclipse).

I can work around it by cleaning the build space (Project->Clean...), but some builds later it starts to happen again.

What other situations can cause this failure? And how to solve it?


Solution

  • 1) Process may still be started even if it seems closed. This is easy to check with task manager.

    2) Your EXE may be open by another process like some buggy debugger that forgot to close its handles or virus or anti-virus (that is not much different from virus :) ).

    Anti-virus's work seem likely.