Export (0) Print
Expand All
Expand Minimize
2 out of 11 rated this helpful - Rate this topic

Compiler Error C2732

Error Message

linkage specification contradicts earlier specification for 'function'

The function is already declared with a different linkage specifier.

This error can be caused by include files with different linkage specifiers.

Change the extern statements so that the linkages agree.


The following sample generates C2732:

// C2732.cpp
extern void func( void );   // implicit C++ linkage
extern "C" void func( void );   // C2732
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.