Mingw libgcc_s_sjlj-1.dll is missing(Mingw libgcc_s_sjlj-1.dll 丢失)
问题描述
我正在尝试使用 mingw 在代码块中编译程序.我必须包含 libw2_32.a 我没有得到任何编译器错误.该程序编译正常,但是当我想运行它时,它说 libgcc_s_sjlj-1.dll 丢失.
I'm trying to compile a program in codeblocks using mingw. I had to include libw2_32.a that I don't get any compiler errors. The program compiles fine but when I want to run it, it says that libgcc_s_sjlj-1.dll is missing.
我在我的 mingw 安装中搜索了这个 dll,但我找到的唯一 dll 是:libgcc_s_dw2-1.dll
I searched for this dll in my mingw installation but the only dll I found is: libgcc_s_dw2-1.dll
我做错了什么?
推荐答案
使用mingw的g++编译时必须使用-static-libgcc,以消除对LIBGCC_S_SJLJ-1.DLL的依赖.您可以通过将 static-libgcc 添加到链接器标志来做到这一点.
You have to use -static-libgcc while compiling with mingw’s g++ to eliminate the dependency on LIBGCC_S_SJLJ-1.DLL. You can do that by adding static-libgcc to the linker flags.
我在这篇文章中找到了这个信息:http://www.qtcentre.org/threads/39639-MinGW-w64-dependency-on-LIBGCC_S_SJLJ-1-DLL
I found this info in this post: http://www.qtcentre.org/threads/39639-MinGW-w64-dependency-on-LIBGCC_S_SJLJ-1-DLL
这篇关于Mingw libgcc_s_sjlj-1.dll 丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Mingw libgcc_s_sjlj-1.dll 丢失


基础教程推荐
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- Windows Media Foundation 录制音频 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- 使用从字符串中提取的参数调用函数 2022-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01