Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.05 KB

compiler-warning-level-1-c4273.md

File metadata and controls

38 lines (29 loc) · 1.05 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4273
Compiler Warning (level 1) C4273
05/23/2022
C4273
C4273
cc18611d-9454-40a4-ad73-69823d5888fb

Compiler Warning (level 1) C4273

'function' : inconsistent DLL linkage

Two definitions in a file differ in their use of dllimport.

Examples

The following sample generates C4273, and shows how to fix it.

// C4273.cpp
// compile with: /W1 /c
char __declspec(dllimport) c;
char c;   // C4273, delete this line or the line above to resolve

The following sample generates C4273. To fix it, delete the redeclaration of printf_s.

// C4273_b.cpp
// compile with: /W1 /clr /c
#include <stdio.h>
extern "C" int printf_s(const char *, ...);   // C4273

See also

dllexport, dllimport
Export C functions for use in C or C++ language executables