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

Author Topic: How to find the Static DLL's?  (Read 9002 times)

0 Members and 1 Guest are viewing this topic.

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
How to find the Static DLL's?
« on: April 09, 2014, 11:35:04 am »
Hi all,

Does anybody know where I can find the Static DLLS for SFML 2.1? I have done searching on the forums and cant really find anything about where they are found.

Can anybody tell me where/how to get them?

Cheers

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: How to find the Static DLL's?
« Reply #1 on: April 09, 2014, 11:46:12 am »
Static DLLs? DLL stands for Dynamic Link Library ???

Do you mean import libraries? Have you looked at the download page?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: How to find the Static DLL's?
« Reply #2 on: April 09, 2014, 12:07:09 pm »
Static DLLs? DLL stands for Dynamic Link Library ???

Do you mean import libraries? Have you looked at the download page?

I mean, to compile in SFML_STATIC I need Static Library's, but I can't find the sfml-graphics-s-d.dll file anywhere for any module.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to find the Static DLL's?
« Reply #3 on: April 09, 2014, 12:09:14 pm »
Because it is static, a static library has no DLL. Instead of being in a separate DLL in case of dynamic linking, the SFML code will be integrated directly into your executable if you link the static libraries.

If you were searching the DLLs, what did you think the static version of SFML was, compared to the dynamic one? ;)
Laurent Gomila - SFML developer

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: How to find the Static DLL's?
« Reply #4 on: April 09, 2014, 12:15:54 pm »
Because it is static, a static library has no DLL. Instead of being in a separate DLL in case of dynamic linking, the SFML code will be integrated directly into your executable if you link the static libraries.

If you were searching the DLLs, what did you think the static version of SFML was, compared to the dynamic one? ;)

I thought there would be a sfml-graphics-s-d.dll file that could be included, I just cant get my project to build when using SFML_STATIC, frustrating to do so.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: How to find the Static DLL's?
« Reply #5 on: April 09, 2014, 12:31:18 pm »
Not sure if you understand what's going on here.

When you link dynamically on Windows you link against *.lib (VS) or *.a (MinGW) files, they do not contain any code and are called "import libraries". They simply tell the linker thing like: "I have a symbol XYZ and it's located in some.dll"
The linker is now happy and builds your executable. At runtime it will then go and look for that entry point in that dll and thus you'll need the dll files at runtime.

When you link statically on Windows you link against *.lib (VS) or *.a (MinGW) files. Now while they have the same file ending, it's not the same as the import libraries at all. SFML is helpful in that matter and provides the -s suffix. These static libraries actually contain all the code of the library. During the linking stage, the linker will look for the needed symbols in the static library and when used directly include it into the executable and since everything gets included there's no need for files such as *.dll.

I hope that helped - I hope to get the second part of the linking guide up on my blog soon enough. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to find the Static DLL's?
« Reply #6 on: April 09, 2014, 01:16:49 pm »
Quote
I just cant get my project to build when using SFML_STATIC
It would be much more efficient to show us what compiler/linker errors you get, instead of trying to deduce a wrong solution by yourself and wasting everybody's time in the wrong direction ;)
Laurent Gomila - SFML developer

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: How to find the Static DLL's?
« Reply #7 on: April 09, 2014, 01:26:03 pm »
Quote
I just cant get my project to build when using SFML_STATIC
It would be much more efficient to show us what compiler/linker errors you get, instead of trying to deduce a wrong solution by yourself and wasting everybody's time in the wrong direction ;)

Decided against using static, I thought of just moving the dll's into a subfolder so its not being seen straight away. Is there a way I have Visual Studio 2013 compile with the dlls in a subfolder? e.g. "data/libs/sfml-graphics-2.dll"

MadMartin

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: How to find the Static DLL's?
« Reply #8 on: April 09, 2014, 01:31:04 pm »
Just why would you do that? It's possible by using LoadLibrary(), but this is a mere hack in my opinion. "Hiding away" is a very bad reason to do such things.

If you don't want any files other than your executable, you would have to choose the static libraries.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to find the Static DLL's?
« Reply #9 on: April 09, 2014, 01:39:34 pm »
So you really don't want to show us your error message(s)?
Laurent Gomila - SFML developer

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: How to find the Static DLL's?
« Reply #10 on: April 09, 2014, 01:42:01 pm »
So you really don't want to show us your error message(s)?

I never got any, thats the point.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: How to find the Static DLL's?
« Reply #11 on: April 09, 2014, 01:52:04 pm »
So if you don't get an error, how do you know something went wrong? ;D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: How to find the Static DLL's?
« Reply #12 on: April 09, 2014, 02:24:37 pm »
So if you don't get an error, how do you know something went wrong? ;D

I havent any clue  :-\ anyway, can you answer my question just before? Is it possible to load the dlls in subfolder when building/running?

e.g "data/libs/<sfml-dll here>"

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to find the Static DLL's?
« Reply #13 on: April 09, 2014, 02:37:37 pm »
Seriously, there has to be something wrong, otherwise you wouldn't be here. So what is wrong when you link SFML statically? What is your problem?

Loading the DLLs from a sub-folder would requires a hack so you're unlikely to get many answers, people on this forum usually prefer to solve problems with clean solutions instead ;)
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: How to find the Static DLL's?
« Reply #14 on: April 09, 2014, 02:54:37 pm »
So if you don't get an error, how do you know something went wrong? ;D
I havent any clue  :-\
So you have no idea, how you cam to the conclusion that something went wrong and you din't get any indication that something did go wrong, but you still know something went wrong? I guess it's time to get some philisophors in here: "I know that I know nothing". ;D

anyway, can you answer my question just before? Is it possible to load the dlls in subfolder when building/running?

e.g "data/libs/<sfml-dll here>"
There isn't.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/