Eclipse CDT无法在Windows中运行编译的可执行文件,并显示错误“终止,退出值:< some number>". [英] Eclipse CDT fails to run compiled executable in Windows with error "terminated, exit value: <some number>"

查看:101
本文介绍了Eclipse CDT无法在Windows中运行编译的可执行文件,并显示错误“终止,退出值:< some number>".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在计算机上重新安装了Windows.在此之前,我在MinGW编译器套件(使用mingw-get下载)中使用了Windows(64位)上的Eclipse CDT IDE.重新安装之前,一切正常.

I just reinstalled Windows on my machine. Before that, I was using the Eclipse CDT IDE for Windows (64-bit) with MinGW compiler suite (downloaded using mingw-get). Everything worked perfectly fine before the reinstall.

安装后,我尝试编译并运行我的C ++项目,但是即使在Hello World!项目中,我也总是在控制台中出现terminated, exit value: <some number>错误.当我尝试从命令行运行可执行文件时,我还收到一条错误消息,指出计算机中缺少libgcc_s_dw2-1.dll.

After the installation I tried to compile and run my C++ projects, but I always got the terminated, exit value: <some number> error in the console, even for a Hello World! project. I also got an error saying the libgcc_s_dw2-1.dll is missing from my computer when I tried to run the executable from the command line.

因此,我卸载了MinGW并再次尝试,但它不起作用.我从系统中完全删除了与MinGW相关的所有内容,删除了Eclipse,删除了每个工作区,清理了所有内容(或者至少是我认为的).然后,我创建了一个新的Eclipse文件夹,然后安装了MinGW并创建了路径变量.一切似乎都已被重置,现在当我尝试编译并运行任何内容时,编译似乎可以正常工作,但仍无法运行可执行文件.在每次启动时,我仍然会遇到相同的错误.清理项目也不起作用.我从Stack Overflow和其他来源尝试了其他几种变通办法,但是它们对我也不起作用,因此我现在毫无头绪,陷入困境.

So I uninstalled MinGW and tried again and it did not work. I completely removed anything related to MinGW from my system, I removed Eclipse, deleted every workspace, cleaned everything (or at least I think). Then I created a fresh Eclipse folder, then installed the MinGW and created path variables. Everything looked like they have been reset and now when I try to compile and run anything, the compilations seems to work fine but running the executable is still not possible. I still get the same error on every launch. Cleaning the project did not work either. I tried several other workarounds both from Stack Overflow and other sources but they did not work for me either and I am clueless at this point and stuck.

我非常感谢您提供有关此问题的帮助.谢谢!

I would really appreciate any help regarding this problem. Thanks!

推荐答案

听起来好像您没有将mingw/bin文件夹正确添加到PATH变量中. libgcc_s_dw2-1.dll应该在其中.

sounds like you did not properly add the mingw/bin folder to your PATH variable. libgcc_s_dw2-1.dll should be in there.

编译应该可以工作,因为eclipse会自动检测到您的mingw安装.但是,当您尝试运行程序时,它只是在PATH变量和它自己的目录中搜索dll,但找不到它

compiling should work, because eclipse autodetects your mingw installation. but when you try to run your program it just searches the PATH variable and it´s own directory for the dll and fails to find it

这篇关于Eclipse CDT无法在Windows中运行编译的可执行文件,并显示错误“终止,退出值:&lt; some number&gt;".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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