c++ - Should I use header-only classes or lib files? -
i creating external library general use. im asking should put every class in .hpp files boost or should compile lib file , keep 2 file per class rule. far can see .hpp used speed, don't have add .lib every class or massive 1 whole thing , cross-platform.
[edit] whats personal preference , why. library personal use. [edit] statically linking library
this depends on if have cross-platform or templated code. may not have awful lot of choice making majority in header files if need lot of preprocessing generate it. otherwise, should pre-compile as possible, general rule.
Comments
Post a Comment