← Back to team overview

coapp-developers team mailing list archive

Re: dynamic loading


> I'm probably misunderstanding how this works, but why can't libpng for
> example, be an optional dependency for the SDL package?

It could, if I built it with dynamic loading and if nuget supported
optional dependencies. I'm just not sure if the dynamic loading has
enough advantages in practice to be worth the trouble. It's also going
to make things more difficult if we want to add static or sxs
variations of SDL_image.

It bothers me that I have to hard-code the filename of libpng, but for
non-sxs dll's at least that's probably fine.

When I started this thread, I believed I'd have to take some specific
action to prevent the libpng nuget package from linking my SDL_image
dll to the libpng dll, but now I think that if I set the define then
SDL_image won't use any symbols from libpng and therefore won't depend
on the dll. So if anything, "supporting" this scenario would just mean
defining a symbol in our packages containing the dll filename (or
strongname if it's sxs?).