【问题标题】:cannot open output file helloWorld.exe: Permission denied无法打开输出文件 helloWorld.exe:权限被拒绝
【发布时间】:2011-10-10 23:42:53
【问题描述】:

当我尝试通过 notepad++ 的运行功能使用 gcc(由 MinGW)编译 helloWorld.c 时,出现错误:

cannot open output file helloWorld.exe: Permission denied

这个问题只发生在我通过notepad++的运行特性运行编译器的时候,所以当我通过cmd手动编译它时没有报错。

正如其他人对类似问题的回答,我尝试在进程资源管理器中查找,但 helloWorld.exe 没有运行。

.

关于我如何在记事本++中运行它的其他详细信息

我使用批处理脚本compile.bat

gcc -o %1 %2
%1
PAUSE

在notepad++中使用命令运行

"...\compile.bat" $(NAME_PART) $(FILE_NAME)

什么可能导致此错误?非常感谢您的帮助。

编辑:原来是notepad++的一个问题,它没有显示它在它自己的目录中工作。另外,当我尝试将目录放入批处理文件时,导致问题的是它无法处理斯堪的纳维亚字母。

【问题讨论】:

  • 尝试输入“chmod a+x %1”

标签: c gcc compiler-construction notepad++


【解决方案1】:

我怀疑记事本试图在它自己的目录中创建输出文件(即在 c:\program files\notepad++ 中的某个位置),而您没有写入权限。

notepad++ 的运行命令中是否有“工作目录”设置?

【讨论】:

    猜你喜欢
    • 2011-10-16
    • 1970-01-01
    • 1970-01-01
    • 2018-04-20
    • 2014-07-19
    • 2011-12-01
    • 2011-03-21
    • 2016-10-10
    • 2021-01-04
    相关资源
    最近更新 更多