Chapter 3 Windows95/NT Compiler/Linker Issues
LabWindows/CVI Programmer Reference Manual 3-12
©
National Instruments Corporation
4. Include this object file in the external compiler project you use to create the DLL.
5. You must call InitCVIRTE and CloseCVIRTE in your DLLMain function. Refer to the
Calling InitCVIRTE and CloseCVIRTE section later in this chapter.
Resolving References from Modules Loaded at Run-Time
Note This section does not apply unless you use LoadExternalModule to load object
or static library files.
Unlike DLLs, object and static library files can contain unresolved references. If you call
LoadExternalModule to load an object or static library file at run time, the Utility
Library must resolve those references using function and variable symbols from the
LabWindows/CVI Run-time Engine, from the executable, or from previously loaded run-time
modules. A table of these symbols must be available in the executable. When you link your
program in LabWindows/CVI, LabWindows/CVI automati cally includes a symbol table. This
is true whether you run your program in the LabWindows/CVI developmen t environment or
as a standalone executable.
When you link your program in an external compiler, the external compiler does not make
such a table available to the Utility Library. LabWindows/CVI provides ways to help you
create the symbol table easily.
Resolving References to the LabWindows/CVI Run-Time Engine
LabWindows/CVI makes available two object files that contain symbol table information for
the LabWindows/CVI libraries that are in Run-time Engine DLLs:
Include cvi\extlib\refsym.obj in your external compiler project if your run-time
modules refer to any symbols in the User Interface, Formatting and I/O, RS-232, DDE,
TCP, or Utility Library.
Include cvi\extlib\arefsym.obj in your external compi ler project if your run- time
modules refer to any symbols in the ANSI C library. If you ha ve to use this obj ect file and
you use Borland C/C++ to create your executable, you must choose Static Linking for the
Standard Libraries. In the Borland C/C++ IDE, you can do this in the New Target and
Target Expert dialog boxes.
Resolving References to Symbols Not in Run-Time Engine
If your run-time modules refer to any other symbols from your executable, you must use
LabWindows/CVI to generate an object file that contains a table of those symbols. Create an
include file that contains complete declarations of all the symbols your run-time modules
reference from the executable. The include file can contain nested #include statements and
can contain executable symbols that your run-time modules do not refer to. If your run-time

00ProRef.book : 06chap03.fm Page 12 Monday, March 9, 1998 3:23 PM