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

Author Topic: [SOLVED] Is it possible to release a game without the DLL?  (Read 1562 times)

0 Members and 1 Guest are viewing this topic.

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
[SOLVED] Is it possible to release a game without the DLL?
« on: February 15, 2013, 06:41:35 pm »
Hey guys!

I made a Breakout clone, and when I want to send the game to my friends, I have to include the .dll in the same place as the .exe. Is there any way to avoid this? I know they are ~5-7 MB, but the whole game is less than 20 MB.

If that's not possible, I thought of making a "bin" folder, and put the .exe and .dll there. However, I run into a bit of a problem. I have some resources on a "resource" folder(see NOTE below) that I need to load. I coded so they load "resources/file.png". However if the .exe is in the bin folder, how do I go up a level?

Thanks!
---

NOTE(files I have right now):
resources (images, music, sounds..)
levels (.txt, I made a custom level loader)
.exe and .dll (not in a folder)
« Last Edit: February 15, 2013, 06:55:00 pm by santiaboy »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Is it possible to release a game without the DLL?
« Reply #1 on: February 15, 2013, 06:47:35 pm »
You can either set the working directory to the 'root' directory, so it would find directly the resources directory, or the even easier solution is just to use ../resources/files in your application and recompile.

If you simply would want to get rid of the DLLs, there's always the option of linking statically, but that can also lead to other problems, if you're not familiar with it and when using the audio module, you'll probably have to link OpenAL and libsndfile dynamically because of their license.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Is it possible to release a game without the DLL?
« Reply #2 on: February 15, 2013, 06:54:42 pm »
Thanks for the quick answer, I don't really know static stuff, so I won't meddle with it right now haha

I will recompile then, and use a file shortcut, so the user doesn't have to enter the bin folder

 

anything