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

Author Topic: sfml-main.lib static vs dynamic compile  (Read 2391 times)

0 Members and 1 Guest are viewing this topic.

steelmanx

  • Newbie
  • *
  • Posts: 2
    • View Profile
sfml-main.lib static vs dynamic compile
« on: January 01, 2014, 06:59:08 pm »
Last night i compiled sfml 2.1 on vs2013.
Except some minor problems with cmake on the static compilation it went very well.
i ended up with release and debug versions of both static and dynamic libs.
All the libs had correct names( -d for debug and -s for static) except for sfml-main.lib had the same name for both static and dynamic builds. I checked and both files have different sizes.
Is there a reason for this inconsistency?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: sfml-main.lib static vs dynamic compile
« Reply #1 on: January 01, 2014, 08:38:20 pm »
Just look at what sfml-main actually does and you'll understand that there's really no reason to make a dynamic lib out of it and CMake doesn't even generate one, regardless whether you choose dynamic or static, no DLL will be generated. There's only a debug and a release version. The debug version will contain some debugging information and will thus most likely be a bit bigger.
You should also always link the debug libs to your debug version and the release libs to your release version. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

steelmanx

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: sfml-main.lib static vs dynamic compile
« Reply #2 on: January 01, 2014, 08:47:44 pm »
I know that it is just a simple solution for portability and that no dll is created.
But i still don't get why i ended up with different versions for static and dynamic compilation.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: sfml-main.lib static vs dynamic compile
« Reply #3 on: January 01, 2014, 08:52:57 pm »
You can also look at the build script of the sfml-main library. There's branching for static and dynamic builds, so you'll have to either ask the CMake guys and/or the Visual Studio 2013 guys, why and more importantly how there would be a difference in size.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/