Edit

Share via


Compiler Error C3641

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

Remarks

The /clr:pure and /clr:safe compiler options are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.

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

Example

The following sample generates C3641:

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