Page 1 of 1
Combining SDL libs/dlls ?
Posted: Wed Oct 20, 2010 4:15 am
by Kyosaur
So i recently decided to add text rendering to my SDL "game" and noticed my project file is filling up quickly with SDL .dlls. All i do with SDL is load PNGs and JPEG images and yet i have like 5 dlls, thats just crazy. By the time my game has text and sound i could have 7-8 dlls!
Is there any way i can combine them all into a single dll? If not is there another media library i could look into that is simple like SDL, and doesnt require so much dlls? I know it may sound silly but having so much really bothers me, especially when your "game" is 100 lines, and hardly does anything at all. If at all possible i would really like to do the first option.
Sorry for making so much posts lately, im trying to keep my n00b questions to a minimum, but there's just so much i dont know :P.
Re: Combining SDL libs/dlls ?
Posted: Wed Oct 20, 2010 4:29 am
by epicasian
You could use SFML; some people call it "the object oriented SDL". With SFML, you can statically link the library, so you don't have a billion DLLs. As you can tell, I don't like seeing a lot of DLLs in my project root directery either :D
Hope this helps.
Re: Combining SDL libs/dlls ?
Posted: Wed Oct 20, 2010 9:49 am
by kamokow
epicasian wrote:You could use SFML; some people call it "the object oriented SDL". With SFML, you can statically link the library, so you don't have a billion DLLs. As you can tell, I don't like seeing a lot of DLLs in my project root directery either :D
Hope this helps.
You can statically link SDL too (or atleast you can in Linux), you just need to make your game open source if you do because SDL is licensed under the LGPL. Of course, if thats not your cup of tea then yes, you could use SFML.
Re: Combining SDL libs/dlls ?
Posted: Wed Oct 20, 2010 1:09 pm
by JGorard159
Both SFML and SDL are great for what I'm doing (basic windowing and input support for a GL engine); but as has already been suggested, SFML doesn't have as many ugly-ass DLLs randomly cluttering up the project directory. Still, I must say that SDL was easier to set up than SFML (for me at least, of course this may simply be due to my incompetance.) However, when building an entire game with all the blitting, rendering and gameplay programmed in SDL, I'm really not sure which would work best, though my vote would still be with SDL.
Re: Combining SDL libs/dlls ?
Posted: Wed Oct 20, 2010 4:03 pm
by Kyosaur
SFML is one of my plans if i cant either statically link these dll's (im a noob, so no idea how to do this. Google was of no help either.) or physically combine all the dll's. I know its possible to do both options here (physically and legally), someone has to know how D: lol.
Re: Combining SDL libs/dlls ?
Posted: Wed Oct 20, 2010 5:11 pm
by JGorard159
I really don't think there's an easy workaround to this problem, in your case. What exactly is it about these excessive SDL dlls which annoys you? Is it simply the fact it contains so many files; because you can always zip the dlls up together into one file, then just add a little unzipper segment into your SDL code (will slow your game's load down considerably, but it does fix your multiple dll problem). I personally have never had a problem with having too many dll files, though maybe it's just that I haven't noticed them piling up
!
Re: Combining SDL libs/dlls ?
Posted: Tue Nov 23, 2010 4:38 pm
by Falco Girgis
If you're on a Windows platform, the Librarian (Archiver for you *Nix fuckers) WILL allow you to link against/embed other libraries. For example, on Windows, I literally include the OpenGL/SDL libs inside of libGyro.lib and only have to link against the single library. In the GCC environment, apparently the archiver *references* the other libraries but does not physically link against them wihen the library is built.
...but I still must ask the question... The entire point of dynamically linking versus static linking is that every library/resource is an external dependency that may be shared between processes... If you really hate having a bunch of external dependencies, you can use a resource editor or statically link against a library containing all of them.
Re: Combining SDL libs/dlls ?
Posted: Sat Nov 27, 2010 9:55 pm
by Kyosaur
GyroVorbis wrote:If you're on a Windows platform, the Librarian (Archiver for you *Nix fuckers) WILL allow you to link against/embed other libraries. For example, on Windows, I literally include the OpenGL/SDL libs inside of libGyro.lib and only have to link against the single library. In the GCC environment, apparently the archiver *references* the other libraries but does not physically link against them wihen the library is built.
...but I still must ask the question... The entire point of dynamically linking versus static linking is that every library/resource is an external dependency that may be shared between processes... If you really hate having a bunch of external dependencies, you can use a resource editor or statically link against a library containing all of them.
Thanks for replying! I'll look into this Librarian, i hope it solves my problem.
As for the your question, im new to C/++ so i really have no idea how i would statically link them at all. I tried to find a tutorial but i didnt have any luck. I really had no idea i could use a resource editor up until now, so that's why i didnt take that route.