This documentation is archived and is not being maintained.

Compiler Error C3414

Error Message

'member' : imported member function can't be defined

A member was defined in code that is also defined in a referenced assembly.

The following sample generates C3414:

// C3414a2.cpp
// compile with: /clr /LD
public ref class MyClass {
public:
   void Test(){}
};

and then:

// C3414b2.cpp
// compile with: /clr
#using <C3414a2.dll>

void MyClass::Test() {    // C3414
}

System::Object::Object() {    // C3414
}

The following sample generates C3414:

// C3414a.cpp
// compile with: /clr:oldSyntax /LD
#using <mscorlib.dll>
public __gc class MyClass
{
public:
   void Test(){}
};

and then:

// C3414b.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
#using <C3414a.dll>

void MyClass::Test()
{    // C3414
}

System::Object::Object()
{    // C3414
}
Show: