29 Apr
2024
29 Apr
'24
10:26 a.m.
One reason against autolink: It decides the use of static vs dynamic libraries depending on a preprocessor define, good luck getting that right in a portable way... The preprocessor define is necessary for things to work, so autolink is correct to decide based on it. I am aware of that, I consider that define basically part of the autolink feature. Point is: Somewhere that define needs to be set. And in a generic or semi-automated environment it might be hard to be correct and could make accidental mixing of shared and static libs easier which poses a potential pitfall with non-trivial consequences (e.g. ODR violations with surprising behavior)