Fatal error : LNK1108: cannot write file at 0x0

Hi Guys I’m getting this : fatal error LNK1108: cannot write file at 0x0 while compiling. I have tried it on a different folder and file and I’m still having the fatal error LNK1108: cannot write file at 0x0.

You’re missing a space between .cpp and /EHsc

Thank you for your reply I just added the space in between the .cpp and the /EHsc and I’m still getting the same error

The error in that screenshot is for the previous command.

Oh sorry I thought I sent the right screen shot here is the right one

sorry I thought I had the second time now this time I know I got the right one

You’re trying to compile the file triplex.cpp but your file is 3triplex.cpp

Im getting the same error however my .cpp file is named correctly. I have tried copying code into a new .cpp file but it throws the same error. If i remove /EHsc & try to compile it throws errors on lines 24 & 6

without /EHsc

Could you try deleting the .obj and .exe files in that directory and trying to compile again?

deleting the VS code .exe worked. Thanks DanM. Legend!

EDIT: It seems to keep bugging out so i have just started using VS Community 2019 instead!

1 Like

Thank you for your advice. I was not able to get it to work after deleting the .obj and I was not sure where the .exe file is. Do you have any other advice?

If you didn’t compile successfully then you wouldn’t have one. The problem by the looks of is that you’re missing / for /EHsc so MSVC is trying to compile and link triplex.cpp and EHsc.obj as when you don’t provide a file extension (e.g. .cpp) it assumes .obj

1 Like

Adding the / to EHsc worked thank you for your help.

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

Privacy & Terms