Closed ccawley2011 closed 2 weeks ago
That's correct. That's why dynamic loading of external dependencies is the default.
It's still an issue on platforms that don't support dynamic linking, though.
Then only build with support for the formats you want.
IMG_Init
andIMG_Quit
initialise and deinitialise libraries based on the value of the flag parameter, however most compilers are unable to remove unused code this way.IMG_Init
is also called within the load functions, so even if a program only requiresIMG_LoadPNG_RW
, the linker will still pull in all of the other libraries, which significantly increases the size of the final executable.