Suddenly, my Visual Studio Express 2010 C++ stopped rebuilding my project. When I first hit F7 the project builds and runs fine (heck, it's a hello world example).
Then I make some changes and hit F7 again, then I get:
1>LINK : fatal error LNK1168: cannot open C:\Users\username\Documents\Visual Studio 2010\Projects\console\Debug\console.exe for writing**<br><br>
Now the funny thing comes:
OS: W7 SP1 64-bit, with latest updates
Any ideas, please?
To fix this issue, verify that the filename file handle is not locked, and that you have write permission for the file. If it is an executable, verify that it is not already running. You can use the Windows SysInternals utilities Handle or Process Explorer to determine which process has a file handle lock on filename .
To fix this issue, stop the program and unload it from the debugger before building it again. If the app is open in another program, such as a resource editor, close it. If your program is unresponsive, you may need to use Task Manager to end the process. You might also need to close and restart Visual Studio.
The problem is probably that you forgot to close the program and that you instead have the program running in the background.
Find the console window where the exe file program is running, and close it by clicking the X in the upper right corner. Then try to recompile the program. In my case this solved the problem.
I know this posting is old, but I am answering for the other people like me who find this through the search engines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With