Fatal Error C1191
'dll' can only be imported at global scope
The instruction to import mscorlib.dll into a program that uses /clr programming cannot appear in a namespace or function, but must appear at global scope.
The following sample generates C1191:
// C1191.cpp
// compile with: /clr
namespace sample {
#using <mscorlib.dll> // C1191 not at global scope
}
Possible resolution:
// C1191b.cpp
// compile with: /clr /c
#using <mscorlib.dll>
namespace sample {}
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ