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

ページ / 211
Chapter 3
Windows 95/NT Compiler/Linker Issues
LabWindows/CVI Programmer Reference Manual
3-20
©
 National Instruments Corporation
Creating Executables in LabWindows/CVI
You can create true 32-bit Windows executables in LabWindows/CVI for Windows 95/NT. In 
LabWindows/CVI for Windows 3.1, you run standalone programs using a special executable 
file that contains the LabWindows/CVI run-time libraries.
 
If you run more than one program 
at a time, Windows 3.1 loads extra copies of this special executable into memory. Under 
Windows 95/NT, the LabWindows/CVI run-time libraries come in DLL form. Standalone 
executables you create in LabWindows/CVI and executables you create in external compilers 
use the same DLLs. If you run more than one program at a time, Windows 95/NT loads only 
one copy of the DLL.
To create a standalone executable, you must first select Standalone Executable from the 
submenu attached to the Target command in the Build menu of the Project window. When 
you select Standalone Executable, the Create Standalone Executable command appears 
below the Target command in the Build menu. The Create Standalone Executable 
command under Windows 95/NT is the same as under Windows 3.1, except that you also can 
specify version information to include in the executable in the form of a standard Windows 
version resource.
Creating DLLs in LabWindows/CVI
In LabWindows/CVI for Windows 95/NT, you can create 32-bit DLLs. Along with each 
DLL, LabWindows/CVI creates a DLL import library for your compatible compiler. You can 
choose to create DLL import libraries compatible with all four external compilers. 
You must have a separate project for each DLL you want to create. Select Dynamic Link 
Library
 from the submenu attached to the Target command in the Build menu of the Project 
window. When you select Dynamic Link Library, the Create Dynamic Link Library 
command appears below the Target command in the Build menu. Refer to Chapter 3, Project 
Window
, in the LabWindows/CVI User Manual, for detailed information on the Create 
Dynamic Link Library
 command.
You can debug the DLLs you create in LabWindows/CVI. Refer to 
the DLL Debugging 
(Windows 95/NT Only)
 section in Chapter 3, Project Window, of the LabWindows/CVI 
User Manual, for more information.
Customizing an Import Library
If you have to perform special processing in your DLL import library, you can customize it. 
Instead of generating a 
.lib
 file, you can generate a 
.c
 file that contains source code. If you 
do this, however, you can export only functions from the DLL, not variables.
00ProRef.book : 06chap03.fm  Page 20  Monday, March 9, 1998  3:23 PM