This documentation is archived and is not being maintained.

Compiler Error C2732

linkage specification contradicts earlier specification for 'function'

The function is already declared with a different linkage specifier.

Possible cause

  • Include files with different linkage specifiers.

Change the extern statements so that the linkages agree.


// C2732.cpp
extern void func( void );       // implicit C++ linkage
extern "C" void func( void );   // C2732