程序无法启动,因为 *.dll 丢失 - MinGW、Eclipse、Windows 7
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7715973/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Program can't start because *.dll is missing - MinGW, Eclipse, Windows 7
提问by user988066
I am well aware of the fact that a multitude of similar problems already appeared on this board, however none of the solutions helped me.
我很清楚这个板上已经出现了许多类似的问题,但是没有一个解决方案对我有帮助。
I am trying to get Eclipse CDT running with MinGW toolchain on Windows 7 Service Pack 1. I already did that on Windows XP and thought that the same procedure will make it run smoothly on Windows 7, but it seems I was mistaken ;)
我正在尝试在 Windows 7 Service Pack 1 上使用 MinGW 工具链运行 Eclipse CDT。我已经在 Windows XP 上这样做了,并认为相同的过程可以让它在 Windows 7 上顺利运行,但似乎我错了;)
After installing MinGW from the automatic installer (just in case I installed a few things more than what I needed) and adding the C:/MinGW/bin to my PATH environment variable, I tried to compile a simple Hello, World! program. Eclipse did not give me any errors, but it didn't want to give any output in the Console window. Alarmed, I tried to run the executable file outside of Eclipse and got the error that
在从自动安装程序安装 MinGW 之后(以防万一我安装了比我需要的更多的东西)并将 C:/MinGW/bin 添加到我的 PATH 环境变量中,我尝试编译一个简单的 Hello, World! 程序。Eclipse 没有给我任何错误,但它不想在控制台窗口中给出任何输出。惊慌失措,我试图在 Eclipse 之外运行可执行文件并得到错误
"Program can't start because libstdc++-6.dll is missing".
“程序无法启动,因为缺少 libstdc++-6.dll”。
Strangely enough, this dll is in the C:/minGW/bin directory, so the PATH variable should 'find' it - but it does not. Copying the dll to the directory with the executable file helped, but it is obviously a short-term solution and I would prefer to have a more "normal" one.
奇怪的是,这个 dll 位于 C:/minGW/bin 目录中,所以 PATH 变量应该“找到”它 - 但它没有。将 dll 复制到包含可执行文件的目录会有所帮助,但这显然是一种短期解决方案,我希望有一个更“正常”的解决方案。
The thing that makes my problem different, I think, from the others I've noticed on this board is the fact that, for one, Eclipse does not find any errors with my PATH variable (which it usually does, if the MinGW was not included in the Path variable or something), and besides the required dlls are where they should be, but it seems my Windows can't find them.
我认为,使我的问题与我在该板上注意到的其他问题不同的事情是,一方面,Eclipse 没有发现我的 PATH 变量有任何错误(如果 MinGW 不是包含在 Path 变量或其他东西中),除了所需的 dll 是它们应该在的地方,但似乎我的 Windows 找不到它们。
回答by Joshua
The "real" solution is indeed to copy the DLL locally. You have to ship that dll when shipping your EXE.
“真正的”解决方案确实是在本地复制 DLL。您必须在运送 EXE 时运送该 dll。