C++ 无法打开输出文件 debug\serbest.exe:权限被拒绝
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3342654/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
cannot open output file debug\serbest.exe: Permission denied
提问by zibib
I compile a Qt program with C++, and I got this error message:
我用 C++ 编译了一个 Qt 程序,我收到了这个错误信息:
cannot open output file debug\serbest.exe: Permission denied
collect2: ld returned 1 exit status
无法打开输出文件 debug\serbest.exe:权限被拒绝
collect2:ld 返回 1 退出状态
What are these command's meaning?
这些命令的含义是什么?
How do I get rid of these errors?
我如何摆脱这些错误?
回答by Henk Holterman
Most likely cause: serbest.exe is still running. Check with TaskManager.
最可能的原因:serbest.exe 仍在运行。检查任务管理器。
回答by Kangkan
It says the current user is not having enough right to write onto the debug folder. Check whether you can create a new file in the folder as referred to.
它说当前用户没有足够的权限写入调试文件夹。检查您是否可以在提到的文件夹中创建新文件。
回答by pradeep
run your compiler software as admin. choose your compiler on start menu > right click and run as admin. you wil not probably see any permission denied errors.
以管理员身份运行编译器软件。在开始菜单上选择您的编译器 > 右键单击并以管理员身份运行。您可能不会看到任何权限被拒绝的错误。
回答by Ura
Sometimes this error caused because of your antivirus added this file in the limited group. This helped me!
有时这个错误是因为你的杀毒软件把这个文件添加到了有限的组中。这对我有帮助!