連結器工具錯誤 LNK2033
'type' 的未解析 typeref Token (token)
類型在 MSIL 中繼資料中沒有定義。
使用 /clr:safe 進行 編譯時,可能會發生LNK2033,其中 MSIL 模組中只有類型正向宣告,其中 MSIL 模組中會參考該類型。
類型必須在 /clr:safe 下 定義。
如需詳細資訊,請參閱 /clr (Common Language Runtime 編譯)。
範例
下列範例會產生LNK2033。
// LNK2033.cpp
// compile with: /clr:safe
// LNK2033 expected
ref class A;
ref class B {};
int main() {
A ^ aa = nullptr;
B ^ bb = nullptr; // OK
};
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應