2x larger SDL2.dll file

Can someone explain to me why SDL2.dll in version 2.0.12 has 1.2MB, and in version 2.0.20 2MB? I’m using an older version and I’ve never had anything go wrong…

It’s 0.8 MB better :stuck_out_tongue_winking_eye:

But really, it’s because stuff has been added to SDL since then.

In this case, it was likely the addition of hidapi into the SDL.dll directly, instead of it being a separate library, but yes, lots of stuff has been added since 2.0.12 in general, too.

Possibly, I did not deal with USB … But since the size has increased 2x, it should be called SDL4 :slight_smile:

1 Like

I love the way SDL is now just a .dll file per library that you want to use, rather than a long list of random dll files. Thank you!!!

So is zlib1.dll now not required? When did that happen (I still bundle it with my app, perhaps unnecessarily)?

are you sure you need(ed) it for SDL2 itself and not SDL2_Image or another addon lib?

I use SDL2, SDL2_ttf and SDL2_net, it could have been any of those that needed it (but on a quick test none do now).

Yes, there used to be a whole load of randomly named DLLs that seemed to need to be included when you distributed an app, now it seems like everything’s been rolled into just SDL2.dll, SDL2_image.dll, SDL2_mixer.dll, SDL2_ttf.dll and SDL2_net.dll

I love the tidiness of that! (I’m probably a bit OCD…)

Not everything…
In another discussion you explain that there should be separate libraries, and here it’s the other way around… Decide…

@ROSY Why are you always so combative?

Anyway, yes, if you want extras like MIDI support for SDL_mixer then you need to ship the appropriate extra DLLs, but if all you want is SDL_mixer itself then you can just ship SDL_mixer.dll. Ditto for SDL_image and supporting less common image formats like WebP.

So not everything… And what a combative…

For anyone like me who is concerned about keeping file sizes down, if you build the current 32-bit SDL3.dll using the VisualC project, it comes in at 1203 KB. Adding the preprocessor definition SDL_LEAN_AND_MEAN it will be further reduced to 776 KB. I had similar results with SDL2. This works on Android builds as well and my APKs way are under 1 MB.

I’ve never had to bundle any extra DLLs. For images I just use LodePNG.

Well, please… How do you compile for Android? I use the old method from the instructions, I want it to work in old versions, max 6.0. apk comes out much bigger… But it compiles under linux.