Mingw libgcc_s_sjlj-1.dll缺失 [英] Mingw libgcc_s_sjlj-1.dll is missing
问题描述
我试图使用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 elemenate the dependacy 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缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!