Reputation: 4841
I keep getting this comiler error. Compiling was working and then just suddenly stopped and is giving me this error and warning:
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppClean.targets(74,5): warning : Access to the path 'C:\Users\Mohammad\Documents\Visual Studio 2010\Projects\CS HR\Debug\CS HR.exe' is denied.
LINK : fatal error LNK1104: cannot open file 'C:\Users\Mohammad\Documents\Visual Studio 2010\Projects\CS HR\Debug\CS HR.exe'
Clearly the access denial is causing the compiler to be unable to open the file but I don't know why it access is being denied.
Upvotes: 2
Views: 3988
Reputation: 5264
I think the process of exe is running,So first close the process and then try to link it.
Upvotes: 0
Reputation: 262919
The CS HR.exe
process is still running, so the executable file cannot be overwritten by the linker.
Try using Task Manager to locate the running process and kill it, then build your project again.
Upvotes: 3