Compiler Warning C4945 with dll hierarchy -
06-09-2008
, 07:43 AM
Hello,
I have a project consisting of several managed dlls (both C# and C++/CLI)
and a few native C++ dlls. To be able to program against common managed
interfaces I have a C# dll called "Interfaces.dll" which is referenced by all
the managed dlls. As soon as one of the C++/CLI dlls also references a second
or third C# dll I get the compiler warning C4945 (cannot import symbol from
'assembly2': as 'symbol' has already been imported from another assembly
'assembly1'). In this case Interfaces.dll is both referenced directly and via
the second or third C# dll. On a complete build this easily exceeds a number
of 1000 warnings.
Is there something like C++'s virtual inheritance which makes the C++/CLI
compiler detect that it's referencing the same symbol? C# doesn't bug me like
this...
Thanks for your help,
Fabian |