Library standardization

e-t172 e-t172 at akegroup.org
Sat Apr 19 10:02:08 PDT 2008


Janice Caron a écrit :
>>  Changing a source file should require the application to be re-linked.
> [but not recompiled]
>>  As someone who has worked on programs that can take half a day to build,
>>  I would throw a fit if every source change required a full rebuild of code that
>>  simply includes a header related to this source.
> 
> So you want the ability to import a module, but not have to rebuild
> dependent files if that module changes?
> 
> Good luck with that one.

It's very easy to do with header files: if the header file has changed, 
you have to recompile all dependent files, if the .d file has changed, 
you only have to relink your application. In the case of a .d file 
included in a shared library, you'll only need to rebuild the library, 
and all programs will automatically use the new library (that's the 
whole point of shared libraries).

For this system to work, you have to know what needs to be put in the 
header (including inlined functions) and what needs to be put in the 
implementation (non-inlined functions). If the programmer doesn't know 
if a function will be inlined or not, this will obviously not work.

Sean was just noticing that this problem is also affecting the 
efficiency of a build system. IMHO, shared libraries are a much bigger 
issue, but I agree the two have to be addressed.



More information about the Digitalmars-d mailing list