Export (0) Print
Expand All
Expand Minimize

Compiler Error C2434

Error Message

'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.

Example

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

ADD
Show:
© 2014 Microsoft