Expand Minimize
0 out of 16 rated this helpful - Rate this topic

Compiler Error C2812

Error Message

#import is not supported with /clr:pure and /clr:safe

The #import Directive is not supported with /clr:pure and /clr:safe because #import requires the use of native compiler support libraries.

Example

The following sample generates C2812.

// C2812.cpp
// compile with: /clr:pure /c
#import "importlib.tlb"   // C2812
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.