FIX:Unresolved External as Visual C++ Compiles Printer Drivers

Last reviewed: October 29, 1997
Article ID: Q128259
3.50 WINDOWS NT kbprg kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft Win32 Device Development Kit (DDK) for Windows NT, version 3.5

SYMPTOMS

An "unresolved external" error is encountered when attempting to build the printer driver samples in the Windows NT DDK version 3.50.

CAUSE

The Windows NT printer graphics drivers use floating point divisions. With Visual C++ version 2.1, floating point divisions are not converted into processor instructions as was the case in Visual C++ version 2.0. Visual C++ version 2.1 uses software emulation instead. However, printer drivers do not link with the runtime libraries, so they cannot use the software emulation.

RESOLUTION

Add the following line to the sources file for the drivers:

386_FLAGS = -Qifdiv-

This flag causes the compiler to use native processor instructions instead of relying on software floating point emulation.

STATUS

Microsoft has confirmed this to be a bug in the version 3.5 Win32 DDK for Windows NT for Intel x86 based platforms using Visual C++ version 2.1 only. This bug was corrected in version 3.51 of the Win32 DDK for Windows NT.

NOTE: Microsoft discourages the use of floating point division in any type of Windows NT driver. Driver writes should take all measures necessary to avoid floating point computations in drivers. Using floating point computations may prohibit future compatibility with driver code.


Additional reference words: 3.50 buglist3.50 fixlist3.51
KBCategory: kbprg kbbuglist kbfixlist
KBSubcategory:
Keywords : kbbuglist kbfixlist kbprg
Version : 3.50
Platform : NT WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.