完美解决LINK : fatal error LNK1104: cannot open file "Debug/xx.exe"的问题

问题: 
运行VC时总出现 
Linking… 
LINK : fatal error LNK1104: cannot open file “Debug/xx.exe” 
Error executing link.exe.

xx.exe - 1 error(s), 0 warning(s)

我的是win7系统 
在C:/Program Files/Microsoft Visual Studio/myprojiects下是找不到你写的工程文件的,因为在这个目录下写东西是需要管理员权限的,所以系统才会报“cannot open file”的错误,解决的办法是关闭软件,然后以管理员权限运行该软件,这样就可以完美运行调试程序了。

补充:还有碰到工程所在的文件夹如果是只读属性,也会有同样的错误,需要去掉只读属性。

猜你喜欢

转载自blog.csdn.net/qinrenzhi/article/details/84790587