0

I got this error a while ago when compiling a project, and I've gotten it every few days since then, even in different projects, and the only solution that worked is restarting. Some people said to open task manager and close the file, but I couldn't find the file. Some people said to delete main.o in the obj/Debug or obj/Release folder, but they just reappeared when I compile. What else should I try? It's really inconveniencing having to restart every time it pops up.

Merle
  • 81
  • 11

2 Answers2

0
  1. check where you put the project maybe is in a file you have no access to it
  2. run Code::Blocks as admin
  3. make sure the program is not still running go to task manager and kill it
  • I have access to the file, it's a new project. I also tried running as administrator, which didn't work either. – Merle Jul 28 '17 at 00:40
  • then I guess you will need to reinstall everything I know codeblocks is buggy that's why I switched to Visual Studio downloading all windows header files is hard its not just windows.h so two options re install everything or reinstall another copy of codeblocks take its minGW files and put it in your codeblocks ide –  Jul 28 '17 at 00:43
  • I think there's a simpler solution than getting rid of everything, I've seen a ton of people get past this problem, it's just that none of the solutions worked for me. – Merle Jul 28 '17 at 00:54
  • the one that will work for sure is to find the file mingw that codeblocks has copy its contents and put them in your codeblocks mingw file I guarantee 100% working –  Jul 28 '17 at 00:59
  • The mingw file that codeblocks has is already in the codeblocks mingw file – Merle Jul 28 '17 at 01:03
  • OH sorry I thought I was on another stackoverflow question sorryyyyyy! –  Jul 28 '17 at 01:06
  • there most be a better way but that's all I have for now maybe some more info like where the file is what codeblocks do you have is it the nonsetup version? is the file on the desktop file...etc may help –  Jul 28 '17 at 01:08
  • possible duplicate of this https://stackoverflow.com/questions/6875403/cannot-open-output-file-permission-denied –  Jul 28 '17 at 01:12
0

Don't just look under which programs are running

  1. Check the processes list (Background Processes)and see if you can find a process running by the same name as your file.
  2. Right click the process name
  3. Choose end task. See if that works. It seems to have worked for me.
Troy
  • 101
  • 9