Error Lnk1168 Cannot Open For Writing
I have qt project but if I edit my code, Qt creator throws out this error
:-1: error: LNK1168: cannot open debug\GettingStarted.exe for writing
I'm not able even to delete the debug folder (i.e. as an administrator). I have to log off and then come back. What is the problem and how can I solve it?
asked Jul 24 '15 at 1:55
CroCoCroCo
5,086 7 gold badges 47 silver badges 75 bronze badges
4
3 Answers 3
- 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
eyllanesc
210k 15 gold badges 103 silver badges 171 bronze badges
answered Jan 21 '16 at 1:38
The BeastThe Beast
1,495 1 gold badge 26 silver badges 39 bronze badges
1
-
If you can't find your
*.exe
in theProcesses
tab of theTask Manager
, then search in theDetails
tabFeb 1 at 8:57
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.
answered Oct 30 '19 at 22:11
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.
answered Oct 6 at 18:13
KapilKapil
162 2 silver badges 6 bronze badges
Not the answer you're looking for? Browse other questions tagged c++ windows qt-creator qt5 or ask your own question.
Error Lnk1168 Cannot Open For Writing
Source: https://stackoverflow.com/questions/31600948/lnk1168-cannot-open-debug-file-exe-for-writing
Posted by: williamswaregs.blogspot.com
Is the program still running? Is it open in a debugger?
Jul 24 '15 at 2:14
@RaymondChen, yes indeed but I don't know why this occurs? I'm trying to open cam with OpenCV. Once I quit the app, it seems something is running in the background.
Jul 24 '15 at 16:17
Maybe you can use Task Manager to see what extra stuff is running (compared to what is running before you build and debug).
Jul 24 '15 at 16:50