Too many DLLs!
Moderator: Coders of Rage
- superLED
- Chaos Rift Junior
- Posts: 303
- Joined: Sun Nov 21, 2010 10:56 am
- Current Project: Engine
- Favorite Gaming Platforms: N64
- Programming Language of Choice: C++, PHP
- Location: Norway
Too many DLLs!
Hi there, folks!
For my graphical projects in MVSC++ I am using SDL. That means, I end up having dozens DLLs. (SDL.dll, SDL_image.dll, SDL_ttf.dll, sdlgfx.dll, SDL_mixer.dll ... and so on)
These DLLs have to be in the same directory as my executable to make the project work. And it simply looks really messy.
So my question is:
Is there a way to move those DLLs in a 'dll' folder, to better organize the filesystem?
As said, I use MVSC++ as my IDE, but I'm not that experienced with most of the settings, so a little spoon feeding may be required. Sorry.
For my graphical projects in MVSC++ I am using SDL. That means, I end up having dozens DLLs. (SDL.dll, SDL_image.dll, SDL_ttf.dll, sdlgfx.dll, SDL_mixer.dll ... and so on)
These DLLs have to be in the same directory as my executable to make the project work. And it simply looks really messy.
So my question is:
Is there a way to move those DLLs in a 'dll' folder, to better organize the filesystem?
As said, I use MVSC++ as my IDE, but I'm not that experienced with most of the settings, so a little spoon feeding may be required. Sorry.
- szdarkhack
- Chaos Rift Cool Newbie
- Posts: 61
- Joined: Fri May 08, 2009 2:31 am
Re: Too many DLLs!
If you think that looks messy, look at the Steam installation folder (or any game for that matter ). As for your question, i didn't find anything with a quick google search, but i might look more into it later when i have the time.
- superLED
- Chaos Rift Junior
- Posts: 303
- Joined: Sun Nov 21, 2010 10:56 am
- Current Project: Engine
- Favorite Gaming Platforms: N64
- Programming Language of Choice: C++, PHP
- Location: Norway
Re: Too many DLLs!
True, but with steam, you launch the game most likely from steam itself, or the automatically created shortcut on your desktop, so it's not often you must dig through the sea of DLLs :pszdarkhack wrote:If you think that looks messy, look at the Steam installation folder (or any game for that matter ). As for your question, i didn't find anything with a quick google search, but i might look more into it later when i have the time.
And thanks for your time, googling for me. I've tried that as well, but found nothing that could help me.
I know there must be a way, since I've seen it a lot - game folders with a separate dll folder.
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: Too many DLLs!
I don't have experience linking to libraries based on relative folder location, but a common trick I've seen is to have a "bin" folder that contains your main binary and all the DLLs. Then, in the main directory, there is a single script to run it (either a .bat or a .sh). That keeps it fairly clean. I try to reduce how many DLLs I use too, but I've given up on trying to link them in some other folder.
- superLED
- Chaos Rift Junior
- Posts: 303
- Joined: Sun Nov 21, 2010 10:56 am
- Current Project: Engine
- Favorite Gaming Platforms: N64
- Programming Language of Choice: C++, PHP
- Location: Norway
Re: Too many DLLs!
I guess this could be a good temporary solution.TheBuzzSaw wrote:I don't have experience linking to libraries based on relative folder location, but a common trick I've seen is to have a "bin" folder that contains your main binary and all the DLLs. Then, in the main directory, there is a single script to run it (either a .bat or a .sh). That keeps it fairly clean. I try to reduce how many DLLs I use too, but I've given up on trying to link them in some other folder.
I don't know, but for an average user it may be scary to open such as a .bat file (they are used to open .exe files, and that is what they will be looking for).
- szdarkhack
- Chaos Rift Cool Newbie
- Posts: 61
- Joined: Fri May 08, 2009 2:31 am
Re: Too many DLLs!
Well, you could always have your installer create a folder with all the binaries in it and add a shortcut on the desktop or something, like almost all games do. The user just clicks the shortcuts and he's "protected" from looking through a sea of DLLs.superLED wrote:I guess this could be a good temporary solution.TheBuzzSaw wrote:I don't have experience linking to libraries based on relative folder location, but a common trick I've seen is to have a "bin" folder that contains your main binary and all the DLLs. Then, in the main directory, there is a single script to run it (either a .bat or a .sh). That keeps it fairly clean. I try to reduce how many DLLs I use too, but I've given up on trying to link them in some other folder.
I don't know, but for an average user it may be scary to open such as a .bat file (they are used to open .exe files, and that is what they will be looking for).
- short
- ES Beta Backer
- Posts: 548
- Joined: Thu Apr 30, 2009 2:22 am
- Current Project: c++, c
- Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
- Programming Language of Choice: c, c++
- Location: Oregon, US
Re: Too many DLLs!
Awww, poor guy/girl, they must be so scared!superLED wrote: I don't know, but for an average user it may be scary to open such as a .bat file (they are used to open .exe files, and that is what they will be looking for).
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
link: https://github.com/bjadamson
- superLED
- Chaos Rift Junior
- Posts: 303
- Joined: Sun Nov 21, 2010 10:56 am
- Current Project: Engine
- Favorite Gaming Platforms: N64
- Programming Language of Choice: C++, PHP
- Location: Norway
Re: Too many DLLs!
Not scary as in "OMG I'm so scared!", but they may think that this file is not supposed to open the game.short wrote:Awww, poor guy/girl, they must be so scared!superLED wrote: I don't know, but for an average user it may be scary to open such as a .bat file (they are used to open .exe files, and that is what they will be looking for).
The only thing I want to accomplish is to follow the standard, so there's a minimum chance of getting confused.
- Nokurn
- Chaos Rift Regular
- Posts: 164
- Joined: Mon Jan 31, 2011 12:08 pm
- Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
- Programming Language of Choice: Proper C++
- Location: Southern California
- Contact:
Re: Too many DLLs!
There are two main solutions I can think of:
- Use a launcher application to set the Path environment variable and then run your program.
- Use a launcher application to set up App Paths and then run your program. Once deployed, your launcher will be rendered unnecessary (unless it performs other tasks), and you can later avoid it by using an installer that sets the App Path.
- Lisergishnu
- Chaos Rift Newbie
- Posts: 24
- Joined: Wed Jan 11, 2012 8:30 pm
- Programming Language of Choice: C++
- Location: Villa Alemana, CL
Re: Too many DLLs!
This 1+Nokurn wrote:There are two main solutions I can think of:Launchers are fairly common in games. Blizzard uses them a lot, Skyrim uses one, basically every MMO uses one.
- Use a launcher application to set the Path environment variable and then run your program.
- Use a launcher application to set up App Paths and then run your program. Once deployed, your launcher will be rendered unnecessary (unless it performs other tasks), and you can later avoid it by using an installer that sets the App Path.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Too many DLLs!
You don't even need a launcher. Just pack your game in an installer that puts all the files in the Program Files directory, and a shortcut on the desktop. Same as any other application.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Re: Too many DLLs!
This^.szdarkhack wrote:If you think that looks messy, look at the Steam installation folder (or any game for that matter )
They're definitely not panicking. Microsoft who came up with this whole "DLL business" definitely don't seem to be panicking from the looks of their programs directories
- superLED
- Chaos Rift Junior
- Posts: 303
- Joined: Sun Nov 21, 2010 10:56 am
- Current Project: Engine
- Favorite Gaming Platforms: N64
- Programming Language of Choice: C++, PHP
- Location: Norway
Re: Too many DLLs!
I think I will go for the installer method, with a shortcut put on the desktop. Thanks for all of the advice! Really appreciated ^^
- Nokurn
- Chaos Rift Regular
- Posts: 164
- Joined: Mon Jan 31, 2011 12:08 pm
- Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
- Programming Language of Choice: Proper C++
- Location: Southern California
- Contact:
Re: Too many DLLs!
If you're talking about using a specific working directory, you might also want to consider the possibility if your EXE being launched directly from Explorer, where the working directory will be set to the EXE's directory.superLED wrote:I think I will go for the installer method, with a shortcut put on the desktop. Thanks for all of the advice! Really appreciated ^^