

Newbies will, for example, make a quick change to the return value of a function and hit "build and run" to see what happens before that time delay has passed. This could explain why so many newbies (like me) are experiencing the problem while most experienced users aren't. After that delay, everything works as it should. To sum up, any change made to the text in the IDE is somehow locking out the user from the output file that exists from the previous "Build and Run," for about 1.5 minutes.

#PERMISSION DENIED CODE BLOCKS WINDOWS#
Further, immediately after exiting the console, Windows DOES permit (permission) the output file name to be changed! Changing the file name THEN immediately making an edit to the source code in the IDE followed by clicking "Build and Run" results in a successful compile. The reason I say this is because, if after clicking the "build and run" button AND exiting the program (the output file) normally, but BEFORE ANY CHANGES are made to the source code, the output file does NOT disappear (in Windows Explorer). But, I suspect that something in C::B is not releasing the file, probably for the sake of saving time by reusing the existing output file rather than rebuilding it from scratch when NO changes are made to the source. Perhaps it has something to do with how Windows collects garbage. This is why it SEEMS to be a random or intermittent problem.

If you wait approximately 1.5 minutes (on my computer) AFTER the very first character has changed in the IDE, the output file WILL disappear in Windows Explorer, at which time, "Build and Run" button will work, ld.exe will link and the program will run. My investigation indicates that this is a time based error. Note: With Windows Explorer open and looking at the folder where the output file is located, the OS will not permit access to the file, however, the folder is fully accessible (add a new folder as a sibling to the output file for example). "Permission Denied" caused by windows not allowing access (renaming, deleting, copy over etc) to the output file ("my_project.exe") ld.exe will throw an error as a result. Click "Build and run" button immediately Make ANY change in the editor (Add a single letter to a remark, add a white space, insert a blank line. The output file process is NOT open in task manager Project folder is in User/documents folder Maybe someone here will be able to adequately shed some light on that.Ĭopied "Hello World" console project from a popular tutorial

#PERMISSION DENIED CODE BLOCKS SOFTWARE#
Though, I don't know how it should be remedied or what software (or OS) is responsible. I'd like to add my 2 cents (observations). And the project files are all in my user/documents folder. I suspect the problem can be fixed in any case, from within the C::B code.Īnyone ever figure out the cause of this or a proper fix? I'm having the same problem, though I never run antivirus or firewall on my computer. It's always been blamed on Windows, from what I've read, but I think it's more likely a combination of how C::B and Windows play together. I've seen numerous people, mostly (if not all) from newbies experiencing an issue where ld.exe throws a "Permission denied" error. I tried to resurrect an old thread on this topic, but was forced to start a new thread instead.
