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

Author Topic: getting rid of the dlls  (Read 1242 times)

0 Members and 1 Guest are viewing this topic.

aradarbel10

  • Newbie
  • *
  • Posts: 6
    • View Profile
getting rid of the dlls
« on: August 20, 2018, 02:30:16 pm »
Hello,
Let's say that I have a project executable that is all working. SFML is linked dynamicly. I want to get rid of the dll's, by either linking sfml staticly or moving them into a sub folder in the .exe directory. I have no idea how to do nor, can anyone help me? I want to know which one of them is better for a piece of software that will be available to download (this should run on almost any computer).

Any help will be appreciated,
Arad.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: getting rid of the dlls
« Reply #1 on: August 20, 2018, 04:35:52 pm »
Most users don't really care about the files in the folder of the executable of the software that they run so just including the DLLs alongside the executable is a pretty acceptable solution.

However, to remove the SFML DLLs completely, you need to link statically. The tutorials explain how to do this; just remember to define SFML_STATIC and to link all the dependencies (that are only needed for static linking) as well.

One other option - to be able to move the DLLs into a sub-folder - is to put the main executable (that uses SFML) into a subfolder with its DLLs and create a simple executable (launcher) that executes the other executable. That way, the executable with which you start the program is in the main folder and the main executable and its DLLs are in a sub-folder.

Another option is to put the DLLs in a folder and add that folder to the environment's global path.

Whichever way you choose, you will still always need to include the OpenAL DLL if you use the audio module. Note that this is still true when statically linking.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*