Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error C2434

'symbol' : a symbol declared with __declspec(process) cannot be dynamically initialized in /clr:pure mode

It is not possible to dynamically initialize a per-process variable under /clr:pure. For more information, see /clr (Common Language Runtime Compilation) and process.

The following sample generates C2434.

// C2434.cpp
// compile with: /clr:pure /c
int f() { return 0; }
__declspec(process) int i = f();   // C2434
__declspec(process) int i2 = 0;   // OK

Community Additions

© 2015 Microsoft