Compiler Error C3641

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

'function' : invalid calling convention 'calling_convention' for function compiled with /clr:pure or /clr:safe

Only __clrcall calling convention is allowed with /clr:pure.

The following sample generates C3641:

// C3641.cpp  
// compile with: /clr:pure /c  
void __cdecl f() {}   // C3641  

Show: