Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
you cannot overload a function with 'C' linkage
Remarks
More than one overloaded function is declared with extern "C" linkage. When using "C" linkage, only one form of a specified function can be external. Since overloaded functions have the same undecorated name, they can't be used with C programs.
This error may occur after an upgrade because of conformance changes in Visual Studio 2019. Starting in Visual Studio 2019 version 16.3, the /Zc:externC- compiler option relaxes this check. The option must come after any /permissive- option on the command line.
Example
The following example generates C2733:
// C2733.cpp
extern "C" {
void F1(int);
}
extern "C" {
void F1(); // C2733
// try the following line instead
// void F2();
}
See also
Compiler Error C2116
extern (C++)
/Zc:externC (Use Standard C++ extern "C" rules)