Code::Blocks Forums

User forums => Help => Topic started by: atilappl on June 23, 2018, 10:33:30 pm

Title: Problem with file.exe, open and hidden-Cannot open output file Permission denied
Post by: atilappl on June 23, 2018, 10:33:30 pm
I am using Code Blocks 16.01 and my OS is Windows 10.
Whenever i build a code (named ''crypto.c'', for example) and execute it, the next time i try to build it i get the following error:

" ld.exe Cannot open output file C:\Users\...\crypto.exe Permission denied
error: ld returned 1 exit status
Build failed: 2 error(s), 0 warning(s)"

I looked on topics with similar problems, but i coudn't figured out how to fix this problem yet.
Also, when i try delete the crypto.exe i receive the message:
"The action can't be completed because the file is open in crypto.exe
Close the file and try again"

I believe this error is due to a hidden instance of the .exe opened somewhere, but i couldn't  find it using the task manager.
How can i find and close this hidden instance of the program?

___________________________________________________________________________________________

I found out there's a process with the same name as the .exe opened when i used the Process Explorer from sysinternals, but when i try to kill the process i receive the message:
"Error opening process: Acess is denied"

Then i tried to terminate the process with de command prompt, but then i received the message:
"ERROR: The process "crypto.exe" with PID 11144 could not be terminated.
Reason: Acess is denied."
Title: Re: Problem with file.exe, open and hidden-Cannot open output file Permission denied
Post by: stahta01 on June 24, 2018, 01:10:27 am
Your problem sounds like anti-virus software has the file open and is scanning it.

Tim S.
Title: Re: Problem with file.exe, open and hidden-Cannot open output file Permission denied
Post by: atilappl on June 24, 2018, 04:52:46 pm
Your problem sounds like anti-virus software has the file open and is scanning it.

Tim S.

I restarted my PC, disabled my anti-virus and began testing my codes. The error remains the same.
The idea seems to be right, but might be another software using the file. Is there any way to find what software are doing this?
Title: Re: Problem with file.exe, open and hidden-Cannot open output file Permission denied
Post by: BlueHazzard on June 24, 2018, 10:03:33 pm
Does this also happen with a simple hello world program?
Do you use dropbox or any other sync service with your files?
Is the console runner still running in the task manager?
Use always the sys internal process explorer. The windows 10 task manager is crippled to death....
With the process explorer you should also be able to find the blocking process, if th exe is opened by a other program and not hanging by itself: Find->Find handle or dll->type in the name of your application...