I have a set of Visual C++ 9 COM component projects dependent on each other.
ComponentA publishes its typelib into ComponentA.tlb. ComponentB imports ComponentA.tlb into ComponentB.idl and publishes ComponentB.tlb. Methods signatures in ComponentB.idl contain parameters of types defined in ComponentA.tlb. Both ComponentA and ComponentB projects compile allright.
ComponentC #imports both ComponentA.tlb and ComponentB.tlb into stdafx.h - this suddenly fails with
error C4772: #import referenced a type from a missing type library;
and later a set of
error C2440: 'return' : cannot convert from '__missing_type__ *' to '__missing_type__'
for wrappers using types defined in ComponentA.tlb. Usually that happens when ComponentA.tlb is not registered, but I've surely run regtlib and see in regedit that it is registered. ComponentA.tlb is present exactly on the path specified in the registry.
What's the problem source and how can the problem be resolved?