FIX: Port I/O Functions Not in DLL Version of CRT for VC++ 4.0 (152030)
The information in this article applies to:
This article was previously published under Q152030 SYMPTOMS
When compiling a program that uses the _inp and _outp instructions and
links with the DLL version of the CRT, you will see one or more of the
following errors:
test.obj : error LNK2001: unresolved external symbol __inp
test.obj : error LNK2001: unresolved external symbol __inpw
test.obj : error LNK2001: unresolved external symbol __inpd
test.obj : error LNK2001: unresolved external symbol __outp
test.obj : error LNK2001: unresolved external symbol __outpw
test.obj : error LNK2001: unresolved external symbol __outpd
test.exe : fatal error LNK1120: 6 unresolved externals
CAUSE
The _inp and _outp functions are not exported from the DLL versions of the
C Run-time Library (CRT), and do not exist in those versions of the CRT. If
you try to use these functions with the DLL version of the CRT, you will
get LNK2001 errors.
RESOLUTION
There are several ways to get around the LNK2001 errors: - Use a #pragma intrinsic instruction.
- Turn on Instrinsic Optimizations.
- Link with one of the static versions of the CRT.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem was corrected in Microsoft
Visual C++, 32-bit Edition, version 4.1.
Modification Type: | Major | Last Reviewed: | 8/4/2001 |
---|
Keywords: | kbbug kbCRT KB152030 |
---|
|