Can you explain me the difference between linking the obj file directly with the application and to put it on a statitc library ?
cocob
Putting in static library means that parts get included only if they are referenced.
BUT, some modules, like Image decoders (PNG, BPM, GIF) perform "self-registration" - they register themself using global constructors to Draw module and once registered, according formats get loaded automatically.
Anyway, if you put them just to .lib, no symbol from such codec package is referenced by the code and they do not get global constructors registered. All of codec code is excluded from resulting binary. No registration of "GIF" happens and you cannot load GIF...