Search code examples
windowsvisual-studioc++-clidependencies

Is this the correct way to eliminate warning C4945 (symbol already imported from another assembly)?


I've got a .net solution (written in C++/CLI) which references some .dll projects as follows:

MainProject->ProjectA->ProbjectB
MainProject->ProjectB

Originally I'd referenced both ProjectA and ProjectB from MainProject which gave me the warnings as mentioned above.

I can remove the warnings by removing the reference to ProjectB from ProjectMain but it makes it less obvious that MainProject relies on ProjectB. Is this the right thing to do to get rid of the warnings?


Solution

  • Speaking in general terms, a system of dependencies can be depicted by a directed graph where each node is a software component and each edge is a dependency. In my opinion, the more simplification that can be done to the graph, the better.