Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
304 views
in Technique[技术] by (71.8m points)

c++ - VC++ fatal error LNK1168: cannot open filename.exe for writing

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:UsersusernameDocumentsVisual Studio 2010ProjectsconsoleDebugconsole.exe for writing**<br><br>

Now the funny thing comes:

  1. The app is not running and it's not shown in task manager.
  2. Going into the project directory and trying to remove it with hands comes with success but the file APPEARS AGAIN FROM NOWHERE.
  3. The system restore is disabled.
  4. I also tried to take the ownership of the whole damn drive.
  5. Every time I delete the file it recreates itself again but sometimes it stops doing that.
  6. If I delete the file (and it recreates after that), and then I start sysinternals procmon then the file dissapears.
  7. If I start procmon before - then the file keeps appearing after delete like always.

OS: W7 SP1 64-bit, with latest updates

Any ideas, please?

question from:https://stackoverflow.com/questions/12124146/vc-fatal-error-lnk1168-cannot-open-filename-exe-for-writing

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Enable “Application Experience” service. Launch a console window and type net start AeLookupSvc


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...