編譯器錯誤 C2201

' identifier ' : 必須有外部連結才能匯出/匯入

匯出的識別碼為 static

範例

下列範例會產生 C2286,並示範如何修正此問題:

// C2201.cpp
// compile with: /c
__declspec(dllexport) static void func() {}   // C2201 func() is static
__declspec(dllexport) void func2() {}   // OK

另請參閱

連結的類型