ld.exe: cannot open output file ... : Permission denied ld.exe: cannot open output file ... : Permission denied c c

ld.exe: cannot open output file ... : Permission denied


I had exactly the same problem right after switching off some (in my opinion unneccessary) Windows services. It turned out that when I switched ON again the "Application Experience" everything resumed working fine.

May be you simply have to turn on this service? To switch ON Application Experience:

  1. Click the Windows start buttonn.

  2. In the box labeled "Search programs and files" type services.msc and click the search button. A new window with title "Services" opens.

  3. Right click on "Application Experience" line and select "Properties" from popup menu.

  4. Change Startup type to "Automatic (delayed start)".

  5. Restart computer.

Application Experiences should prevent the problem in the future.


Your program is still running. You have to kill it by closing the command line window.If you press control alt delete, task manager, process`s (kill the ones that match your filename).


If you think the executable is locked by a process, try Process Explorer from SysInternals. In the File/handle, enter Fibonacci.exe and you should see who holds the file.

If it is not enough, you can use Process Monitor (from SysInternals, again) to follow the activity of all processes on your system on Fibonacci.exe.With a little bit of analysis (call stacks), you'll may find out why the access to the file is denied and what make it disappear.