0

I'm trying to run my first SFML program using Code::Blocks 16.01. It compiles, but then warns me that libgcc_s_sjlj-1.dll is missing. My compiler is GCC 4.8.1-4. Other similar questions, such as: "libgcc_s_sjlj-1.dll" is missing, have said to use linker flags, so I included -static-libgcc and -static-libstdc++as linker flags, but that didn't work.

The MinGW bin is included in my path. I have copied the .dlls into the directory with my executable. I looked in the actual bin and the .dll isn't even actually there, so I have reinstalled MinGW a couple times.

One thing I have not done is download the .dll itself which I have read is not a good idea. I'm not sure how to get past this error.

Community
  • 1
  • 1
Holly
  • 55
  • 1
  • 7

1 Answers1

1

Yes, it's a problem about dynamic linking and static linking.

I met this confusion several months ago, when I build and run my little code snippet, the computer warned me that "stdc++-6.dll" was missing, so I tried to google and download the .dll file(which should be located in c:\windows\system32), but it didn't work, because when I run my program next, it warns that "libgcc_s_sjlj-1.dll is missing".

I didn't download the file, but I make some "extra settings" like you, I included -static-libgcc and -static-libstdc++ as linker flags, and it didn't work either, then I include -static. enter image description here

Then my codes work so well. And I wish it could help you.

P.S.I have written an article in Chinese to talk about this problem.

A.Z.Young
  • 81
  • 4