LNK1168: cannot open debug\file.exe for writing
- Go to the task manager Ctrl+Alt+Del.
- look for the name of your running application in your case
GettingStarted.exe
. right click --> end process
or just pressSuppr
. This will kill the running process.- Go back to your code and run the application again
In my simple case (Qt only, no external libs, same error LNK1168) the Task manager showed nothing useful to kill. Only total reboot has helped and error is gone.
All the methods mentioned here has not helped except reboot. There is no any ProjectName.exe in Task Manager.
You can go to C:\Users\user-name\source\repos\ProjectName\Debug\
folder and rename ProjectName.exe
. You can't delete this file at that time, but It can be renamed. It can only be deleted after reboot.