“identifier”:必须有外部链接才可进行导出/导入
导出的标识符为 static
。
示例
以下示例生成 C2286,并演示如何修复此错误:
// C2201.cpp
// compile with: /c
__declspec(dllexport) static void func() {} // C2201 func() is static
__declspec(dllexport) void func2() {} // OK
“identifier”:必须有外部链接才可进行导出/导入
导出的标识符为 static
。
以下示例生成 C2286,并演示如何修复此错误:
// C2201.cpp
// compile with: /c
__declspec(dllexport) static void func() {} // C2201 func() is static
__declspec(dllexport) void func2() {} // OK