Compiler Warning (level 1) C4944
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Warning (level 1) C4944

Error Message

'symbol' : cannot import symbol from 'assembly1': as 'symbol' already exists in the current scope

A symbol was defined in a source code file and then a #using statement referenced an assembly that also defined the symbol. The symbol in the assembly is ignored.


The following sample creates a component with a type called ClassA.

// C4944.cs
// compile with: /target:library
// C# source code to create a dll
public class ClassA {
   public int i;

The following samples generate C4944.

// C4944b.cpp
// compile with: /clr /W1
class ClassA {
   int u;

#using "C4944.dll"   // C4944 ClassA also defined C4944.dll

int main() {
   ClassA * x = new ClassA();
   x->u = 9;
© 2016 Microsoft