컴파일러 오류 C2812
/clr:pure 및 /clr:safe를 지정하면 #import를 사용할 수 없습니다.
설명
/clr:pure 및 /clr:safe 컴파일러 옵션은 Visual Studio 2015에서 더 이상 사용되지 않으며 Visual Studio 2017에서는 지원되지 않습니다.
#import 지시문은 네이티브 컴파일러 지원 라이브러리를 사용해야 하므로 /clr:pure 및 /clr:safe #import
에서 지원되지 않습니다.
예시
다음 샘플에서는 C2812를 생성합니다.
// C2812.cpp
// compile with: /clr:pure /c
#import "importlib.tlb" // C2812