“无法打开a.exe” C ++中的错误 [英] "Cannot Open a.exe" Error in C++
问题描述
我试图编译我的C ++程序,但当我按Build按钮,它显示以下错误信息:
c:/ gnat / 2010 / bin /../ libexec / gcc / i686-pc-mingw32 / 4.3.6 / ld.exe:
无法打开输出文件a.exe:无效
参数collect2:ld返回1退出
状态
这不是第一次这样做。当我一直编辑同一个项目并经常建立它时,似乎这样做最好,几乎就好像东西已经淹没,或重载,或者什么。
我已经修复它,我相信,重新启动我的电脑,但我不能继续重新启动我的电脑每次这种情况发生。
我认为这只是一个一次性的问题,但它一直发生,所以我想我会寻找更多的帮助。
我发现另一个SO 问题,我认为有相同的错误消息/问题,因为我有。但是,当我尝试在上述问题上列出的解决方案时,没有任何帮助。
有其他人遇到过这个问题吗?或者有谁知道我可以如何解决这个问题(除了每次重新启动我的电脑)?
我正在jGrasp开发,如果这有助于任何。
编辑:我只是想补充说,我认为可能是我的以前的可执行文件仍然在后台运行,但即使我关闭我的IDE,让我删除可执行文件,因为它说它仍在运行。
我检查了我的进程浏览器,看看a.exe是否仍然在运行,但是在我的进程中绝对没有什么与jGrasp或a.exe有关。
猜测你的可执行文件仍在运行。这是我想到的唯一原因...我想最好的是检查你的任务管理器(进程资源管理器是你的朋友;))。
I'm trying to compile my C++ program, but when I press the "Build" button, it displays the following error message:
c:/gnat/2010/bin/../libexec/gcc/i686-pc-mingw32/4.3.6/ld.exe: cannot open output file a.exe: Invalid argument collect2: ld returned 1 exit status
This is not the first time it has done this. It seems to do this most when I have been editing the same project a lot and building it often, almost as if something has been flooded, or overloaded, or something.
I had fixed it before, I believe, by restarting my PC, but I can't afford to keep restarting my PC every time this occurs.
I thought this was just a one-time problem, but it has continued to happen and so I thought I'd look for more help on this.
I found another SO question that I thought had the same error message/problem as I had. However, when I tried the solutions listed on afore-linked question, nothing helped.
Has anyone else had this issue? Or does anyone know how I can fix this issue (besides restarting my computer every time)?
I am developing in jGrasp also, if that helps any.
EDIT: I just wanted to add that I thought it might be that my previous executable was still running in the background, but even if I close my IDE, it still won't let me delete the executable, because it says it is still running.
I checked my process explorer to see if the a.exe was still running, but there's absolutely nothing in my processes that has to do with jGrasp or a.exe
I guess your executable is still running. It's the only reason I think about... I guess the best is to check on your task manager (process Explorer is your friend ;)).
这篇关于“无法打开a.exe” C ++中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!