如何修复“权限被拒绝 collect2.exe:错误:ld 返回 1 退出状态"在 Windows 上的 Sublime Text 3 [英] how to Fix "Permission denied collect2.exe: error: ld returned 1 exit status" in Sublime Text 3 on Windows

查看:148
本文介绍了如何修复“权限被拒绝 collect2.exe:错误:ld 返回 1 退出状态"在 Windows 上的 Sublime Text 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,在 sublime text 3 中,我编写了一个 .cpp 文件,我是编译器,并且有:

so, in sublime text 3, im program a .cpp file, and i'm compiler and there are have :

C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file C:\Users\okera\Desktop\CRUD/main.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
[Finished in 0.8s]

推荐答案

此答案参考 Windows 10 上的 Sublime editor 3.

答案是 .exe 文件仍在后台运行,这就是您无权再次运行它的原因.

The answer to this is that the .exe file is still running in the background which is why you do not have the access to run it again.

根据我的经验,有一个简单的修复方法.

There is a simple fix as per my experience.

第一步:打开任务管理器

Step 1: Open Task Manager

第 2 步:打开详细信息选项卡(这只是一个示例,用于显示去哪里)

Step 2: Open Details Tab ( This is just a sample to show where to go )

第 3 步:就您而言,您要在名称"部分找到的程序是 ma​​in.exe.

Step 3: In your case the the program you want to find in the "Name" Section is main.exe.

第 4 步:找到后,单击它,然后单击任务管理器窗口右下角的结束任务.

Step 4: Once you find it, click on it and click End Task at the bottom right of the Task Manager window.

第 5 步:现在,您的程序已结束运行.转到 Sublime 并再次构建您的代码.

Step 5: Now, your program has ended its run. Go to Sublime and build your code again.

您的代码肯定会运行.

如果仍然发生任何错误,请告诉我.谢谢.

Do let me know if any error is still occurring. Thanks.

这篇关于如何修复“权限被拒绝 collect2.exe:错误:ld 返回 1 退出状态"在 Windows 上的 Sublime Text 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆