C++ Mingw libgcc_s_sjlj-1.dll 丢失
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12921911/
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
Mingw libgcc_s_sjlj-1.dll is missing
提问by Maecky
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 在代码块中编译程序。我必须包含 libw2_32.a,我没有收到任何编译器错误。该程序编译正常,但是当我想运行它时,它说缺少 libgcc_s_sjlj-1.dll。
I searched for this dll in my mingw installation but the only dll I found is: libgcc_s_dw2-1.dll
我在 mingw 安装中搜索了这个 dll,但我找到的唯一 dll 是:libgcc_s_dw2-1.dll
What am I doing wrong?
我究竟做错了什么?
回答by bobestm
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.
您必须在使用 mingw 的 g++ 编译时使用 -static-libgcc 以消除对 LIBGCC_S_SJLJ-1.DLL 的依赖。您可以通过将 static-libgcc 添加到链接器标志来实现。
I found this info in this post: http://www.qtcentre.org/threads/39639-MinGW-w64-dependency-on-LIBGCC_S_SJLJ-1-DLL
我在这篇文章中找到了这个信息:http: //www.qtcentre.org/threads/39639-MinGW-w64-dependency-on-LIBGCC_S_SJLJ-1-DLL