Author Topic: Execution error  (Read 17512 times)

Offline iamcreasy

  • Single posting newcomer
  • *
  • Posts: 4
Execution error
« on: January 10, 2010, 06:56:33 pm »
Sometimes i see the following error and the code doesn't compile..but after several attempts, all of a sudden a successful compile occurs....but why this is happening?

Linking console executable: bin\Debug\test_1.exe
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot open output file bin\Debug\test_1.exe: Permission denied
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Execution error
« Reply #1 on: January 10, 2010, 08:51:20 pm »
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot open output file bin\Debug\test_1.exe: Permission denied
This error comes from the linker and thus from the OS which means, that the linker (the OS) cannot modify the executable. This can have many reasons: Besides missing access rights it might be that the application is still running (maybe even as daemon or "ghost application" after a crash). Another reason (under windows) is often that e.g. a virus scanner blocks access to the executable because an exe file is being generated (by the linker) which may be causes by a virus, too. Try o disable you AV software and/or check the permissions and/or make sure via the task manager the application is really not running anymore.

However, this is not an issue with C::B.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

PitchBull

  • Guest
Re: Execution error
« Reply #2 on: January 02, 2011, 07:32:48 pm »
yes its work for me : i use comodo internet security with the fonctionnality "sandbox"

when i add codeblock to "sure files" the error disapered.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Execution error
« Reply #3 on: January 02, 2011, 09:13:16 pm »
yes its work for me : i use comodo internet security with the fonctionnality "sandbox"
Good to hear. I use Comodo myself and I can say the Sandbox feature sucks if you are a developer. It's simply useless in that case because all your applications will be sandboxed even if you just re-compiled. I've turned this feature off. Defense+ is another story. You can configure it that it works with what you are developing but it took me ~2 month of fine-tuning. The AV solution works, too after I set several self-written programs to a "trusted" state. I am still having issues from time to time with a special application that uses scripting which is identified as malware (sure it is not).

In the end: As a developer running a AV/Firewall/Security application can really be annoying due to these many false alarms. :-(
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ