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

ID: Q128259


The information in this article applies to:


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 query words: 3.50 buglist3.50 fixlist3.51


Keywords          : 
Version           : 3.50
Platform          : NT WINDOWS 
Issue type        : 

Last Reviewed: March 2, 1999