This is something I've just blindly accepted and followed as "the way it is". I'm trying to gain a deeper understanding of the "why" behind it.
- static library LibA - utulizes some C runtime calls
- static library LibB - utilizes some C runtime calls
- executable App - utilizes LibA, LibB, and some C runtime calls
It is pretty well documented here and a bunch of other places that all modules passed to a given invocation of the linker must have been compiled with the same run-time library compiler option.
If all symbol resolution is performed during the final link for App as discussed here and here, why is this the case? Why do LibA and LibB even need to specify a specific runtime library to use when they build? Shouldn't the C runtime calls they use just resolve against whatever runtime App specifies for its link?
Is this an issue in other C development environments or is it specific to Visual Studio?