Author Topic: Newbie Need Help Please  (Read 5623 times)

Offline yoyoguyss

  • Single posting newcomer
  • *
  • Posts: 3
Newbie Need Help Please
« on: August 08, 2013, 02:31:28 pm »
Before reading this do know I have already tried Google. And only then am I coming here for help after trying!


Okay I am having this strange error with Code Blocks you see whenever I compile and run a simple C++ console application program to print hello world but if I edit it and make it print hello XOX then it gives me this error:

||=== Sam, Debug ===|
ld.exe||cannot open output file bin\Debug\Sam.exe Permission denied|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|

Okay So I have tried Google and the few solutions they had given me does not work.
I have already tried:

1.Checking weather the processor is closed and it is. Checked through task manager and processor explorer.
2.Turned of Fire Wall and UAC settings and Antivirus in fact, I uninstalled my antivirus.
3.Tried deleting completely any previous compiler like cygwin which is still within registry causing problems.
4.Tried re-installing Code blocks.
5.Tried closing by pressing on the keyboard and also by clicking on X button on screen with mouse.

Nothing seems to work.

Here is what I have learned about my error:

1.When I go to and open my project file then open bin folder then open debug folder I can see the .exe file for execution which has been built. I Have full access to the .exe file until I edit the program in which case it becomes locked and when locked I cant delete it.

2.If I wait for 2 minutes the locked .exe file is automatically gone or deleted and then when I execute the edited program it works and the .exe for the edited program is built again in same location.

3.If I delete the .exe of the original program that is the .exe which I have access to then execute the edited program it works and if I delete the .exe of the edited program and make another edited program it works.

So I need to delete .exe every time before execution which is very annoying so I was hoping that someone could tell me how delete this .exe automatically after I close the program execution. So that this error does not pop every time I want to execute my program.

I am running as administrator on windows 7 ultimate -32 bit version and have MinGW32 as compiler and Code Blocks 12.11.

Please,I need help from someone who knows how to solve this error.
« Last Edit: August 09, 2013, 09:40:36 am by yoyoguyss »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Newbie Need Help Please
« Reply #1 on: August 08, 2013, 09:30:05 pm »
wtf is this formatting of your post? Why do you write in bolt? do you think no one will answer you, if you use the normal formatting?
please use for the build log code tags (thy # symbol in the editor).

to you problem. it is not c::b realated, because you have also problems with the explorer to delete the file, and so this forum is the wrong place to ask such questions (see forum rules)
i personally think there is some av software, but you have written you have uninstalled all av software.

you can try to use the "Process Explorer" http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx from Microsoft(R) to see what process locks your file

greetings

Offline yoyoguyss

  • Single posting newcomer
  • *
  • Posts: 3
Re: Newbie Need Help Please
« Reply #2 on: August 09, 2013, 09:39:09 am »
Sorry I taught my format would make things easier to read for people :-\ , oh and I am sorry I guess its my PC's issue. Still don't know where to post though,
I have already tried Processor explorer All Processor close automatically but its the .exe file which does not auto delete, which I guess it should have after the executed program is closed. I have to do it manually each time or else the .exe file just gets locked I have tried programs like file unlocker and still nothing , sorry to bother you guys anyway .........

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Newbie Need Help Please
« Reply #3 on: August 09, 2013, 10:05:58 am »
you can try to use the "Process Explorer" http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx from Microsoft(R) to see what process locks your file

not to close the process....

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Newbie Need Help Please
« Reply #4 on: August 09, 2013, 10:27:39 am »
The exe-file should (of course) not be auto deleted.
That would not make any sense !
Normally programs that get developped should be deployes sooner or later.

The exe will be overridde by the compiler (or more exactly the linker).
But this onlly works if the OS allows it.

Windows or some obscure "security" software (they are more or less all obscure) might allow creating new exe's, but not overriding existing ones.

Nevertheless: this is not an issue of C::B and therefore violating our forum rules !

When registering here you accepted to respect these rules !!

Offline yoyoguyss

  • Single posting newcomer
  • *
  • Posts: 3
Re: Newbie Need Help Please
« Reply #5 on: August 09, 2013, 10:48:12 am »
Sorry please lock this thread or delete it