LINK : fatal error LNK1104: cannot open file 'triplex.exe'

I have been in my triplex.cpp file for about 20 minutes in VS Code, making updates, saving and compiling successfully. I started the next lesson and migrated my code to a new PlayGame function and started receiving this compile error:

LINK : fatal error LNK1104: cannot open file ‘triplex.exe’

To resolve, I closed VS Code, opened the exe file and closed it. This worked but I have no idea why. Starting this chain to help anyone having issues with this error as I could not find a consistent answer.

The antivirus may be deleting the .exe file. Add it to the exclusion list.

1 Like

Because compiling would involve overwriting the existing executable. It can’t do that if you have the program running.

1 Like

This may have been because my program was running! After I shut everything down/killing everything in task manager and restarting Visual Code I was fine again.

Could be. I did have an antivirus running during this. Good look!

This helped me. Thank you for posting this. I restarted my VS Code and everything went back to normal. I don’t know why it worked, but it did.

1 Like

You’re welcome! I will continue to track everything I find or run into to help others… I took a little break for some personal reasons but picking up where we left off now. How are you making out?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms