You have to recompile a.exe every time the public interface of b.dll changes (not only the size, also when members are reordered, private/public changes [this also affect member ordering, without being visible from the source code], ...). If C
is part of the public interface, then you need to recompile A.exe also every time whhn C
changes. You only don't need to recompile a.exe if C
is a private class of b.dll, which is nowhere referenced from a.exe. Also note that C
can be indirectly referenced, for example when your B::funx
is an inline function, since then the instantiation of C can take place in tho code of A.exe.
As a rue of thumb, when you replace the definition of C
with the declaration class C;
, and still can compile A.exe, you don't need to care about C
. But I would rather suggest to compile A.exe every time, since when at some point in the future the code changes, so that this condition is not met, you are going to get hard to debug errors.