National Instruments 320685D-01 ユーザーズマニュアル

ページ / 211
Chapter 4
Windows 3.1 Compiler/Linker Issues
LabWindows/CVI Programmer Reference Manual
4-2
©
 National Instruments Corporation
keywords such as 
far
near
, or 
huge
 in the declaration of functions to be called from 
LabWindows/CVI source code.
If your Watcom-compiled module performs floating point operations, you must use 
Watcom Version 9.5 or later. 
Use the following options when you compile with Watcom IDE:
Set the Project Target Environment to 32-bit Windows 3.x, and set the Image Type 
to Library [.lib].
Turn on the Disable Stack Depth Checking [-s] option.
Turn on the Change Char Default to Signed [-j] option.
Add 
-zw -d_NI_mswin16_
 to the Other Options.
Turn on the Generate as Needed [-of] option for Stack Frames.
Turn on the No Debugging Information option.
Turn on the In-line with Coprocessor [fpi87] option for Floating Point Model.
Turn on the Compiler default option for the Memory Model.
Turn on the 80486 Stack-Based Calling [-4s] option for the Target Processor.
Use the following compiler flags when using 
wcc386
 or 
wcc386p
:
-zw -s -4s -j -fpi87 -d0 -of -d_NI_mswin16_
You can use optimization flags in addition to the 
f
, and you can use other flags, such 
as 
-wn
, which do not affect the generation of object code.
Using 32-Bit Borland or Symantec Compiled Modules 
under Windows 3.1
In this section, CVI refers to both LabWindows/CVI and Watcom modules, while Borland 
applies to both Borland and Symantec modules.
The following restrictions apply to Borland object modules:
Borland packs bit fields in structures differently than CVI, so you cannot share structures 
with bit fields between Borland and CVI.
Borland returns structures, floats, and doubles differently than CVI. Therefore, functions 
that return these types cannot be called from CVI if they are defined in Borland, or vice 
versa. The exceptions are the ANSI C library functions that return doubles, which you 
can call from within Borland compiled modules.
Note
This rule applies only to return values. You can use structs, floats and doubles as 
output parameters without limitation. 
00ProRef.book : 06chap04.fm  Page 2  Monday, March 9, 1998  3:23 PM