代码块,C ++构建:权限被拒绝collect2.exe [英] Codeblocks, C++ build: Permission denied collect2.exe

查看:422
本文介绍了代码块,C ++构建:权限被拒绝collect2.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Codeblocks(Windows)中构建和运行带有2个头文件的C ++源文件。为此,我建立了一个Codeblocks项目(这是第一次)。我也一直在网上寻找设置的解决方案,但仍然收到相同的消息。
这是构建日志:

I'm trying to build and run a C++ source file with 2 header files in Codeblocks (Windows). I built a Codeblocks project to do so (this is the 1st time). I have also looked online for solutions on settings but I keep getting same message. This is the build log:


找不到C:\Userscs106:权限被拒绝
collect2 .exe:错误:ld返回了1个退出状态

cannot find C:\Users\cs106: Permission denied collect2.exe: error: ld returned 1 exit status

搜索目录/编译器: C:\MinGW\bin
搜索目录/链接器: C:\MinGW\bin
搜索目录/资源编译器: C:\MinGW\bin

search directories/compiler: "C:\MinGW\bin" search directories/linker: "C:\MinGW\bin" search directories/resource compiler: "C:\MinGW\bin"



<我也附上我的项目的照片。
我在哪个字段中指定在哪里可以找到此* .exe文件?

I attach a picture of my project as well. In what field do I specify where to find this *.exe file?

我最新的构建日志如下:

My latest build log is the following:


--------------构建:在CS106v3.2中进行调试(编译器:GNU GCC编译器)---------------

-------------- Build: Debug in CS106v3.2 (compiler: GNU GCC Compiler)---------------

mingw32-g ++。exe -LC :\MinGW\bin -LC:\MinGW\bin -o bin\Debug\CS106v3.exe obj\Debug\main.o C:\Users\E\Documents\ Algorithm\C ++ S\cs106 C:\MinGW
mingw32-g ++。exe:错误:C:\Users\E\Documents\Algorithm\C ++ S\cs106:否文件或目录
进程终止,状态为1(0分钟,0秒)
1错误,0警告(0分钟,0秒( s))

mingw32-g++.exe -LC:\MinGW\bin -LC:\MinGW\bin -o bin\Debug\CS106v3.exe obj\Debug\main.o "C:\Users\E\Documents\Algorithm\C++ S\cs106" C:\MinGW mingw32-g++.exe: error: C:\Users\E\Documents\Algorithm\C++ S\cs106: No such file or directory Process terminated with status 1 (0 minute(s), 0 second(s)) 1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

但我在任何地方都没有提到 C:\Users\E\Documents\Algorithm\ C ++ S\cs106。为什么在该文件夹中查找?

Yet I do not refer anywhere to "C:\Users\E\Documents\Algorithm\C++ S\cs106". Why is it looking in that folder?

推荐答案

此错误消息权限被拒绝 collect2.exe是因为代码块控制台应用程序是仍在后台运行。
在Windows 8上:右键单击屏幕底部的菜单栏。
然后在进程下单击任务管理器

在已处理的名为控制台窗口主机上找到
右键单击它,然后单击结束任务
单击复选框放弃未保存的数据并关闭
然后单击关闭
。之后,您应该会很好。

This error message "Permission denied" collect2.exe is because the codeblocks console application is still running in the background. On windows 8: right click on the menu bar at the bottom of your screen. Then click "Task Manager" Under Processes. Locate on the the processed named "Console window Host" Right click on it and click "End Task" Click in the check box "Abandon unsaved data and shut down" Then click on "Shutdown" You should be good after that.

这篇关于代码块,C ++构建:权限被拒绝collect2.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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