none
Visual studio 2015 Error 0xc0000142 with LNKerror1168

    Question

  • Im using Visual C++ Win32 project

    running visual studio community on Windows 10

    Any time that I try to compile and run any code on VS what happens is that:

    The first time it works no problem but when I add anything to it, like a loop or a simple output, then test it it gives me the error 0xc0000142 with a cmd prompt window. nothing shows up in the cmd prompt and I'm unable to close it, even using the task manger doesn't work.

     In looking in the VS "Output" window the error LNK1168 cannot open c:\users\(my name)\documents \visual studio 2015\Project\(my project)\debug\(myproject).exe for writing shows up. I've reinstalled Visual studio 2015 and I can't seem to find a working solution, Please help.

    Monday, November 30, 2015 12:41 AM

Answers

  • Hi RB.Bright,

    >>error LNK1168 cannot open c:\users\(my name)\documents \visual studio 2015\Project\(my project)\debug\(myproject).exe for writing shows up.

    Please re-open your project, clean and rebuild your solution, run it again.

    Generally the error means that the file was locked by other processes or tools.

    So you could check with Windows Task manager whether is running or not. If it is running, maybe you can kill the process and try to execute again.

    Reference:

    https://msdn.microsoft.com/en-us/library/hhbdtt6d.aspx

    Please also close other third party tools in your windows before you compiled it again.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 01, 2015 12:21 PM
    Moderator

All replies

  • Hi RB.Bright,

    >>error LNK1168 cannot open c:\users\(my name)\documents \visual studio 2015\Project\(my project)\debug\(myproject).exe for writing shows up.

    Please re-open your project, clean and rebuild your solution, run it again.

    Generally the error means that the file was locked by other processes or tools.

    So you could check with Windows Task manager whether is running or not. If it is running, maybe you can kill the process and try to execute again.

    Reference:

    https://msdn.microsoft.com/en-us/library/hhbdtt6d.aspx

    Please also close other third party tools in your windows before you compiled it again.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 01, 2015 12:21 PM
    Moderator
  • Thank you very much This worked out!!! 

    Sunday, December 06, 2015 12:57 AM
  • @RB.Bright,

    Glad to know that this issue has been resolved, if so, please make the useful reply as the answer, so it would be helpful for other members who get the same issue to research and find the answer directly, and I could close this case for you.

    Sincerely,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 07, 2015 6:02 AM
    Moderator