Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Weird build problem with SFML 2.2  (Read 1577 times)

0 Members and 1 Guest are viewing this topic.

XtremePrime

  • Newbie
  • *
  • Posts: 5
  • Just a lonely programmer
    • View Profile
    • ShadowzGames
Weird build problem with SFML 2.2
« on: February 06, 2015, 06:54:26 am »
Hey there, community.
I've been having a problem trying to build a project with version 2.2. Once I finished my code, the project built perfectly but when I wanted to run the project via the .exe file, I kept an error that "libgcc_s_sjli.dll" is missing from my system.

I thought it's because I didn't do -static-libgcc, but that didn't solve it, so I kept looking over the interwebs for answers, but nothing did it. So I reverted back to 2.1, made the build again and it seems to work with 2.1. Can someone explain why this is happening?

Thanks for understanding c:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10890
    • View Profile
    • development blog
    • Email
AW: Weird build problem with SFML 2.2
« Reply #1 on: February 06, 2015, 01:14:21 pm »
If you build SFML without checking SFML_USE_STATIC_STD_LIBS your SFML libraries will be linked dynamically again the runtime libs and you'll have to ship the DLLs with your game.
If you want to link them statically, you'll need to check the CMake option when building SFML and you need to link your application statically agains the runtime libs as well.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

zmertens

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: Weird build problem with SFML 2.2
« Reply #2 on: February 06, 2015, 09:35:29 pm »
Were you building on Windows with MinGW + CodeBlocks by any chance? I had a similar error message pop up if I remember correctly. In  the SFML tutorials it talks about 2 different distributions of MinGW (CodeBlocks uses a different one than the standalone MinGW it appears).
The truth will set you free but first it will piss you off.

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Weird build problem with SFML 2.2
« Reply #3 on: February 06, 2015, 10:05:26 pm »
You need to go to your $MINGW_INSTALL_DIR/bin, find libgcc_s_sjli.dll, and copy it to the folder the exe is in.

When running the program from within Code::Blocks or whatever IDE, it generally has your paths set up correctly for running, but outside of the IDE, Windows uses the default PATH, which generally doesn't include your mingw install. So you have to copy the dlls needed from there, to the same folder as the exe, to distribute your program.

 

anything