Ambil perhatian
Akses ke halaman ini memerlukan kebenaran. Anda boleh cuba log masuk atau menukar direktori.
Akses ke halaman ini memerlukan kebenaran. Anda boleh cuba menukar direktori.
unresolved typeref token (token) for 'type'
Remarks
A type doesn't have a definition in MSIL metadata.
LNK2033 can occur when compiling with /clr:safe and where there is only a forward declaration for a type in an MSIL module, where the type is referenced in the MSIL module.
The type needs to be defined under /clr:safe.
For more information, see /clr (Common Language Runtime Compilation).
Example
The following example generates LNK2033.
// LNK2033.cpp
// compile with: /clr:safe
// LNK2033 expected
ref class A;
ref class B {};
int main() {
A ^ aa = nullptr;
B ^ bb = nullptr; // OK
}