0
votes

I'm using Eclipse Helios in Windows7 for C/C++ programming. I wrote a basic C++ code and tried to compile. The output is:

**** Incremental Build of configuration Release for project Programming Project **** Info: Internal Builder is used for build g++ -o "Programming Project.exe" "src\ch_3_excercises.o" c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot open output file Programming Project.exe: Permission denied collect2: ld returned 1 exit status

How can I fix this error?

6
Consider adding the code that you think is causing the error to the question. Also, you may check stackoverflow.com/questions/27593029/… if this can lead you to solutionmcveat
does the code works before ? or you could not run any program on eclipse ? @Gizem ÇetinElhaw

6 Answers

3
votes

All you have to do is go to project on the menu bar and then click clean project. Clean all of your projects and then it should work.

1
votes

The same problem with me while editing my code.the easy way i used is ::::::::

press the red button(Terminate) before editing your code then run your code it is tested and works

1
votes

I know this is an old question, but it probably does that because you are interrupting the flow of your program, for instance using scanf(), and not actually giving the input it requires, so when you use the command Build the project, then eclipse is waiting a stream from your keyboard (for instance, maybe it's a different type of program, but follow me here).

Once you know than that is the problem, then you might wanna keep an eye in what is that you are not giving to the project and that it is expecting you to; and the way to stop this annoying error the next time you get it, is that in your console view you press the red button.

0
votes

That will happen if the program is still running in another window. The .exe file stays open until the program finishes execution, and you can't delete a file while any processes have it open.

I don't use Eclipse for C/C++ development, and the problem almost can't happen with Code::Blocks, but this happens very often with Visual C++. Just close the other window and rebuild.

0
votes

Check your quarantine folder of your antivirus. If you see the executable file, then add it to the Trust list or White list. Your problem should be solved.

0
votes

It means the same .exe file is running in your system. A program cannot be build when its already running. So the simple and most obvious thing to do is:-

  1. Open task manager
  2. Find <yourfilename.exe> under processes
  3. Right click and end task

This stops it from running in background. So you can build your program anew and run.