CLION无法打开输出文件,拒绝了权限

Clion cannot open output file, permission denied

本文关键字:拒绝 权限 文件 输出 CLION      更新时间:2023-10-16

因此,我正在尝试在Clion上运行一些C 代码,但是每次我尝试使用它来读取此文件时:

"C:Program FilesJetBrainsCLion 2017.3bincmakebincmake.exe" --build C:UsersCollinDocumentsSchoolC++exercises3.smartIOcmake-build-debug --target 3_smartIO -- -j 4
[ 50%] Linking CXX executable 3_smartIO.exe    
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot open output file 3_smartIO.exe: Permission denied
    collect2.exe: error: ld returned 1 exit status
    CMakeFiles3_smartIO.dirbuild.make:95: recipe for target '3_smartIO.exe' failed
    mingw32-make.exe[3]: *** [3_smartIO.exe] Error 1
    CMakeFilesMakefile2:66: recipe for target 'CMakeFiles/3_smartIO.dir/all' failed
    mingw32-make.exe[2]: *** [CMakeFiles/3_smartIO.dir/all] Error 2
    CMakeFilesMakefile2:78: recipe for target 'CMakeFiles/3_smartIO.dir/rule' failed
    mingw32-make.exe[1]: *** [CMakeFiles/3_smartIO.dir/rule] Error 2
    Makefile:117: recipe for target '3_smartIO' failed
    mingw32-make.exe: *** [3_smartIO] Error 2

从我的理解中,这意味着由于权限问题,它无法打开文件。我尝试检查文件是否已经运行(情况并非如此),我尝试在运行之前将其删除,这也行不通。

我还认为我将其保存在Google驱动器中可能是问题,但是当它不在驱动器中时也会发生。

有人有任何建议吗?我在某个地方阅读了错误代码1意味着任务仍在运行。我看过任务管理器,但找不到正在运行的程序。

编辑:好吧,只是试图重新启动我的笔记本电脑,这确实有效。这意味着问题确实是我尝试运行该程序仍在运行。新问题是:为什么我找不到它的任何痕迹?

更可能是,您的目标文件3_smartio.exe受另一个运行过程保护,因此,您是否尝试将其(clion)关闭并继续进行?它应该帮助您。