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

Author Topic: Placing .dll's in a location so SFML will reach them everytime  (Read 3930 times)

0 Members and 1 Guest are viewing this topic.

Chuckleluck

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Hello,
Every time I create a new project, I have to place the .dll's I need (sfml-graphics.dll, sfml-system.dll, etc.) in the location of my project file.  This works, but it's becoming a nuisance having to copy & paste those files every time I create a new project.  Is there a way I can make it so SFML can find the .dll's in a central location (say, my C: drive)?

Thank you in advance.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: Placing .dll's in a location so SFML will reach them everytime
« Reply #1 on: March 27, 2012, 10:55:12 pm »
%WINDIR%\system32

Serapth

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Placing .dll's in a location so SFML will reach them everytime
« Reply #2 on: March 28, 2012, 12:54:59 am »
%WINDIR%\system32


This will work, but I promise you, it will bite you in the ass hard at some point in the future.  This is especially true for a library under active development.


I experienced this to a brutal degree working with the GAC ( the .NET equivalent ), that I will never EVER EVER use dlls in a global location.  EVER. 


Truth is, you just need to learn your IDE a bit better, you can simply specify a path and go from there.  It's not that difficult once you know the how of it.  What IDE are you using?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Placing .dll's in a location so SFML will reach them everytime
« Reply #3 on: March 28, 2012, 01:10:40 am »
If you don't like to fill your system32 folder with dlls you could also install the library and then set the enviroment variable PATH to the binary folder.
Additionally for development I think it should be possible to configure the project settings in a way that it will search for the dlls at specific location.
And if you don't want to deal with dlls at all, just link staticly. But be aware there are some down sides to this too. (More details can be revealed by a search on stackoverflow: dynamic vs static)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

CriticalThread

  • Guest
Re: Placing .dll's in a location so SFML will reach them everytime
« Reply #4 on: March 28, 2012, 08:44:38 am »
hello,
if you're using codeblocks you can easily set a path to your *.dll files and you don't need to copy the .dll's every time to your project folder. i don't know about other IDE's.

in CodeBlocks:
Settings - Compiler and Debugger Settings - Toolchain executables - Additional Paths - the path to your SFML dll's

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: Placing .dll's in a location so SFML will reach them everytime
« Reply #5 on: March 28, 2012, 10:42:46 am »
Doesn't Windows look in PATH for runtime libraries too? If that's the case, you could make a directory where you place all your development runtime DLLs without polluting the system directories. However I don't know if PATH is being searched and 2nd if it's possible to specify a load priority.

DLL hell. :(

 

anything