Compiler Error C2201
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 C2201.
identifier' : must have external linkage in order to be exported/imported
The exported identifier is static.
The following sample generates C2286:
// C2201.cpp
// compile with: /c
__declspec(dllexport) static void func() {} // C2201 func() is static
__declspec(dllexport) void func2() {} // OK
Show: