简体   繁体   中英

Starting with codeblocks, building a Hello world does not work (Permission denied)

If I have just run CodeBlocks, I can build and run the Hello world and I the prompt shows and everything is fine. I close it, change what is written, and this message appears: ld.exe||cannot open output file bin\\Debug\\HellowWorld.exe Permission denied|

I need to do way more difficults programs than a helloworld, and I've seen in several webs this problem addressed, but nothing works:

http://forums.codeblocks.org/index.php/topic,15047.30.html[1]

ld.exe: cannot open output file ... : Permission denied

After much reading, I understand it has something to do with how the program handles memory. It's something like, if it thinks there's still a process in execution, it does not let me build it again. But I do close it. I've tried everything: input any text so the windows closes (and it does), going to window task manager and finishing the process itself. It does not work. The kicker is that, if I let a few minutes pass, I can indeed build again and run it again. It's kinda stupid and I need help to fix this.

Even more links: The first one I don't get it. I downloaded it and checked as it's said in the wiki:

http://wiki.codeblocks.org/index.php?title=Creating_a_new_project[3]

The link:

http://www.reddit.com/r/learnprogramming/comments/1rvmhx/i_just_started_programming_and_stuck_from/[4]

I mean, I can have done wrong even that. But it does compile and build and run the first time arround...

Most likely the program is still running. Then you can't replace its executable.

If it doesn't have a visible user interface then you can forcefully terminate it via Task Manager Shift + Ctrl + Esc .

Or simpler, always build as console program, because then you can just close the program's console window.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM