“function”:DLL 链接不一致
注解
文件中的两个定义在其使用 dllimport 方面有所不同。
示例
以下示例生成 C4273,并演示如何修复它。
// C4273.cpp
// compile with: /W1 /c
char __declspec(dllimport) c;
char c; // C4273, delete this line or the line above to resolve
以下示例生成 C4273。 若要修复此问题,请删除 printf_s 的重新声明。
// C4273_b.cpp
// compile with: /W1 /clr /c
#include <stdio.h>
extern "C" int printf_s(const char *, ...); // C4273