I am getting this error when compiling c++ code in the visual studio command window. The command cl /EHsc main.cpp works except for the error stated in the title. I have been trying suggestions for hours and none of them have worked. I have tried repairing, modifying, and reinstalling visual studio. Last time I used this software (about 6 months ago), I never had this issue. I had a different computer but still was using windows 10 and visual studio. Also, sometimes it doesn't give me this error and builds the .exe file, but then says "Access denied". I programmed c++ in VS a lot before and never had this issue.
Asked
Active
Viewed 795 times
1
-
1What anti-virus are you using? I'd check if it's blocking access. Avast is notorious for this but others do as well. – Retired Ninja Apr 04 '17 at 03:49
-
1check your task manager to see if `main.exe` is running, if running, kill it and try once more. – Jiahao Cai Apr 04 '17 at 03:51
-
main.exe is not running and i am using the same anti-virus as before when I had no issues. The only thing different is a new computer but same OS and since I am on a school network, I have a safeconnect app that starts up everytime I boot. I think its some sort of way the school monitors illegal activity but I dont know why this would conflict with this. – Jack Apr 04 '17 at 03:57
-
there is an answer to a similar question here but windows 10does not have this option which is suggested in the main answer: http://stackoverflow.com/questions/3906404/link-fatal-error-lnk1104-cannot-open-file-d-myproj-exe – Jack Apr 04 '17 at 03:58
-
I disabled SafeConnect and it didn't fix it. – Jack Apr 04 '17 at 04:09