Jump to content
  • Advertisement
Sign in to follow this  
Waaayoff

LINK : fatal error LNK1168: cannot open <Filename>.exe for writing?

This topic is 2146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just switched to visual studio professional from express (thank you ISIC). Anyway, i keep getting this error when i run my project. Google said that i should enable the Application Experience service, except windows 8 gives me this error when i try to do that:

 

---------------------------
Services
---------------------------
Windows could not start the Application Experience service on Local Computer.
 
Error 1053: The service did not respond to the start or control request in a timely fashion.
 
---------------------------
OK   
---------------------------
 

Share this post


Link to post
Share on other sites
Advertisement
That error is usually generated when the application is still running. Check the Processes view of the Task Manager to see if some process using that image is still running and kill any you find. Alternatively it is possible a virus scanner is spending an awful lot of time with the application (some security solutions will actively upload unknown executables to a remote server for analysis and completely lock the file while they do so).

As a quick test, try changing the output name.

Share this post


Link to post
Share on other sites

Same problem. Works at first but when i change something and recompile, i get the same error.

 

Edit: So i just restarted the laptop and the problem went away (why didn't i do that before i don't know). Which is weird since no related processes were open in the task manager.

Edited by Waaayoff

Share this post


Link to post
Share on other sites

 

Same problem. Works at first but when i change something and recompile, i get the same err

 

As BitMaster pointed out, this error is usually caused from the application running.  The reason it is still happening after a recompile is because something is wrong with your code.  Is this a Win32 project? If so, when you run it under a debugger and close the window with the "x" button, does the debugger release?  If no, how is your window class created? How does your message proc look?

This tends to happen a lot with Win32 code.

Edited by ByteTroll

Share this post


Link to post
Share on other sites

Same problem. Works at first but when i change something and recompile, i get the same error.

 

Edit: So i just restarted the laptop and the problem went away (why didn't i do that before i don't know). Which is weird since no related processes were open in the task manager.

 

This is usually a problem that occurs in Win32 apps, where the app gets sent into an infinite loop when the window has been destroyed. Run it in a debugger, close it, and then 'break' execution (debug->break all in VC++) to find out where it's currently sitting (you might need to jump about in the call stack to find out where that is, because it might be currently within a win32 function). 

Share this post


Link to post
Share on other sites

I rather doubt it's a win32 problem since i've been working on this project for 3 months and the problem just appeared. (All i changed was the speed of the player lol)

Share this post


Link to post
Share on other sites

Well, you can either check to see if this is what's causing the problem and let us know, or we can keep telling you the same thing.

Share this post


Link to post
Share on other sites

I rather doubt it's a win32 problem since i've been working on this project for 3 months and the problem just appeared. (All i changed was the speed of the player lol)

 

Regardless of what has happened, the cause is usually the same.  Your program is staying in an endless loop and is preventing the release of the program by the operating system upon exit.  I don't know why it just started happing, however, I can take a few wild guesses depending on what language you are using.  For example, one cause I have witnessed in beginner Win32 code done in C is when a game system (player stats in your case) is implemented using pointers.  The pointer is initialized somewhere, the pointer is *usually* deleted somewhere.  However, somewhere in program execution, the pointer gets reassigned to an object like the window handle.  In this scenario, if you reassigned the pointer to the window handle, you will delete the window handle, the Win32 API does not get the chance to delete the handle and release it, and you are stuck in the endless loop RobTheBloke described.  This, of course, is one of many, many reasons that causes this, but they usually always relate to an endless loop.

Edited by ByteTroll

Share this post


Link to post
Share on other sites

I rather doubt it's a win32 problem since i've been working on this project for 3 months and the problem just appeared. (All i changed was the speed of the player lol)

 

I'd like to introduce you to git, and the nice front end for it, tortoise git. Everytime you make a change that works, commit the changes, and add a little comment describing your change. The next time you think that you've just changed something minor, git should point out that you have infact changed something else as well (and like every human, you've simply forgot about it....)

Edited by RobTheBloke

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!