Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C3414
Collapse the table of content
Expand the table of content

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
}

Community Additions

ADD
Show:
© 2015 Microsoft