19

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.

I searched for this dll in my mingw installation but the only dll I found is: libgcc_s_dw2-1.dll

What am I doing wrong?

1 Answer 1

31

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.

I found this info in this post: http://www.qtcentre.org/threads/39639-MinGW-w64-dependency-on-LIBGCC_S_SJLJ-1-DLL

2
  • 1
    thanks for the link, that wasn't my problem but i saw in the link, that this description is for mingw 64. this pointed me in the right direction. i compiled the program using the 32 bit mingw compiler instead of the 64 bit compiler.
    – Maecky
    Oct 20, 2012 at 20:14
  • Sorry where do you add static-libgcc to the linker flags in codeblocks? Aug 20, 2015 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.