No need for version expression is a lie

Walter Bright newshound2 at digitalmars.com
Thu Aug 24 17:12:16 UTC 2023


On 8/24/2023 8:30 AM, Adam D Ruppe wrote:
> I wrote at greater length about this here:
> http://dpldocs.info/this-week-in-d/Blog.Posted_2022_11_14.html#redesign-for-template-emission-woes

Unfortunately, when compiling a library with one set of switches and linking it 
with a binary created with another set of switches, one is always going to run 
the risk of mismatch (and not just with -version).

For a library designed to be distributed as a binary, the interface to it needs 
to be carefully designed to minimize this risk.

For a library distributed as source, but intended to be built separately, it's 
less of an issue but it still needs to be designed to minimize the risk.

This just comes with static compilation.

A header-only library doesn't have these problems.


More information about the Digitalmars-d mailing list