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.