Compilation is done on the fly: only the CIMG functionality used by your program is compiled and compiled. The qualified program leads to any unused stuff without much compact code.
Anyone knows the theory? CIMG is a header-only library, and they generously use the template, which they are talking about.
If they must include the entire CImg library in a precompiled library (.dll /.lib/.a/.so) library file of any kind, despite which you Actually use bit.
Library attached to a static link (.lib or .a), the linker then can then strip unused symbols, but it may depend on the optimization settings.
When one or two headers is included in the entire library, it is compiled only when you #include it, and therefore it will compile the compilation process like the rest of your compilation , And the compiler can easily determine which part of the library is used, and which is not.
And because CImg uses API templates, no code is generated for those tasks that are never called.
They are expanding it for a while because other answers show that unused symbols will usually be stripped anyway .
Comments
Post a Comment