Compiler Error C3386
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3386.
type' : __declspec(dllexport)/__declspec(dllimport) cannot be applied to a managed or WinRTtype
The dllimport and dllexport __declspec modifiers are not valid on a managed or Windows Runtime type.
The following sample generates C3386 and shows how to fix it:
// C3386.cpp
// compile with: /clr /c
ref class __declspec(dllimport) X1 { // C3386
// try the following line instead
// ref class X1 {
};
Show: