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

前端 未结 12 433
我寻月下人不归
我寻月下人不归 2020-12-04 14:02

I recently installed CodeBlocks with mingw32 on Windows 7 Ultimate 32bit in order to dust off my c skills, but this problem has me somewhat stumped.

I decided to fir

相关标签:
12条回答
  • 2020-12-04 14:40

    The Best solution is go to console in eclipse IDE and click the red button to terminate the program. You will see the your program is running and output can be seen there. :) !!

    0 讨论(0)
  • 2020-12-04 14:43

    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.

    0 讨论(0)
  • 2020-12-04 14:43

    Problem Cause : The process of the current program is still running without interuption. (This is the reason why you haven't got this issue after a restart)

    The fix is simple : Go to cmd and type the command taskkill -im process-name.exe -f

    Eg:

     taskkill -im demo.exe -f
    

    here,

    demo - is my program name

    0 讨论(0)
  • 2020-12-04 14:43

    I had a similar problem. Using a freeware utility called Unlocker (version 1.9.2), I found that my antivirus software (Panda free) had left a hanging lock on the executable file even though it didn't detect any threat. Unlocker was able to unlock it.

    0 讨论(0)
  • 2020-12-04 14:45

    It may be your Antivirus Software.

    In my case Malwarebytes was holding a handle on my program's executable:

    Using Process Explorer to close the handle, or just disabling antivirus for a bit work just fine.

    0 讨论(0)
  • 2020-12-04 14:50

    Got the same issue. Read this. Disabled the antivirus software (mcaffee). Et voila

    Confirmed by the antivirus log:

    Blocked by Access Protection rule d:\mingw64\x86_64-w64-mingw32\bin\ld.exe d:\workspace\cpp\bar\foo.exe User-defined Rules:ctx3 Action blocked : Create

    0 讨论(0)
提交回复
热议问题