“libgcc_s_sjlj-1.dll”不见了 [英] "libgcc_s_sjlj-1.dll" is missing

查看:1539
本文介绍了“libgcc_s_sjlj-1.dll”不见了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行我的第一个SFML应用程序。
我可以通过代码块环境运行它,但我不能通过资源管理器运行 - 出现一个错误说:libgcc_s_sjlj-1.dll丢失。我将这些行添加到我的链接器选项中:

I am trying to run my first SFML application. I can run it via Code Blocks environment, but I can't run it through the Explorer - an error appears that says: "libgcc_s_sjlj-1.dll is missing". I added these lines to my linker options:

-static
-static-libgcc
-static-libstdc++

但是,在尝试编译之后,我在构建日志中看到一个错误:

However, after trying to compile it, I see an error in the build log:

mingw32-g++.exe: error: unrecognized command line option '-static-libstdc++'

如何解决?
我的GCC版本是4.7.1 TDM-1

How can I fix it? My GCC version is 4.7.1 TDM-1

推荐答案

GCC 4.7.1是一个相当旧的版本, -static-libstdc ++ 是一个相当新的选项。我相信
它在主要的GNU 4.7.x发行版,但有一些佐证的证据
MinGW GCC 4.7.1没有它。

GCC 4.7.1 is a rather old version, and the -static-libstdc++ is a rather new option. I believe it was there in the main GNU 4.7.x distribution, but there is some corroborating evidence that MinGW GCC 4.7.1 did not have it.

无论如何,你不需要静态链接默认库。您的TDM-GCC安装是32位变体。假设
驻留在 C:\ TDM-GCC-32 ,则 libgcc_s_sjlj-1.dll 位于 C:\ TDM-GCC-32 \bin 。检查它
是否存在。

Anyhow, you shouldn't need to link the default libraries statically. Your TDM-GCC installation is the 32 bit variant. Assuming it resides in C:\TDM-GCC-32, then libgcc_s_sjlj-1.dll resides in C:\TDM-GCC-32\bin. Check that it is there. If not, your TDM-GCC installation is broken and you'll need to fix or reinstall it.

否则,要在Windows命令提示符下成功运行您的程序,或者从Windows命令提示符处成功运行您的程序,资源管理器,
C:\ TDM-GCC-32 \bin 必须在 PATH 环境变量。检查是否:(控制面板
- > 系统和安全 - > 系统 - > 高级系统设置 - > 环境变量 - > PATH )。

Otherwise, to run your program successfully at the Windows command prompt or from Explorer, C:\TDM-GCC-32\bin has to be in your PATH environment variable. Check if it is: (Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables -> PATH).

然后我被骗了。如果没有,请将; C:\ TDM-GCC-32 \bin 附加到 PATH
正常重建你的程序(没有 -static - * 选项),然后从Explorer或者从 new 提示您打开(禁止任何其他动态链接问题)。

If it's present then I'm stumped. If not, append ;C:\TDM-GCC-32\bin to the PATH and OK out. Rebuild your program normally (without the -static-* options) and it will then run from Explorer, or from a new command prompt that you open (barring any other dynamic linkage problems).

从Code :: Blocks运行程序时不会遇到此程序,因为它
自动在运行程序之前,将 PATH 前缀到配置的
编译器的二进制文件的路径名。

You do not encounter this program when running the program from Code::Blocks because it automatically prefixes the PATH with the pathname to the binaries of the configured compiler before running your program.

请考虑升级到最新的TDM GCC分发

这篇关于“libgcc_s_sjlj-1.dll”不见了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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