【问题标题】:Permission denied error when running simple c++ program运行简单的 C++ 程序时权限被拒绝错误
【发布时间】:2018-08-17 12:09:00
【问题描述】:

几乎每次我尝试在 CLion 上运行简单代码时都会收到此错误。 我没有尝试将项目保存在 C 盘中。

c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe:无法打开输出文件A__IQ_test.exe : 没有权限 collect2.exe:错误:ld 返回 1 退出状态 CMakeFiles\A__IQ_test.dir\build.make:95:目标“A__IQ_test.exe”的配方失败 mingw32-make.exe[3]: * [A__IQ_test.exe] 错误 1 mingw32-make.exe[2]: [CMakeFiles/A__IQ_test.dir/all] 错误 2 CMakeFiles\Makefile2:66:目标“CMakeFiles/A__IQ_test.dir/all”的配方失败 mingw32-make.exe[1]: [CMakeFiles/A__IQ_test.dir/rule] 错误 2 CMakeFiles\Makefile2:78:目标“CMakeFiles/A__IQ_test.dir/rule”的配方失败 mingw32-make.exe: * [A__IQ_test] 错误 2 Makefile:117: 目标“A__IQ_test”的配方失败

【问题讨论】:

  • 检查任务管理器,看看你是否已经打开了程序。或者以管理员身份运行 IDE,或更改输出位置

标签: c++ gcc mingw clion


【解决方案1】:

这通常意味着您的程序已经在运行。在它运行时,您不能用新的替换它。确保在尝试重建程序之前已关闭程序。如果你认为你已经这样做了,那么它可能存在一个挂起的错误 - 附加你的调试器以找出答案。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-24
    • 2012-10-05
    相关资源
    最近更新 更多