National Instruments 320685D-01 Drums User Manual


 
Chapter 3 Windows 95/NT Compiler/Linker Issues
©
National Instruments Corporation 3-17 LabWindows/CVI Programmer Reference Manual
Borland Static versus Dynamic C Libraries
When you link a Borland C/C++ project that contains object or static library files you create
in LabWindows/CVI, it is a good idea to configure the Borland project to use the static version
of the Borland C libraries.
If you choose to use the dynamic C libraries, you must compile the LabWindows/CVI object
modules with the
_RTLDLL macro. You must define the _RTLDLL macro in your source code
before including any of the Borland C header files.
Borland Incremental Linker
You cannot use your LabWindows/CVI object or static library files in the Borland C compiler
if you choose to use the incremental linker. Turn off the Use Incremental Linker option.
Borland C++ Builder
You cannot use your LabWindows/CVI object or static library files in the
Borland C++ Builder.
Watcom Pull-in References
The Watcom linker does not automatically link the startup code into your application or DLL.
Instead, it requires the module that contains
main, WinMain, or DllMain to reference a
special symbol that the appropriate startup code module resolves. The Watcom compiler
automatically generates a reference to the special symbol into any module that contains
main,
WinMain, or DllMain. This symbol is __DLLstart_, _wstart2_, or _cstart_,
depending on whether the project is for a DLL, Windows application, or console application,
respectively. Object modules compiled in LabWindows/CVI do not contain such references.
LabWindows/CVI cannot generate the correct reference because it makes no distinction
between console and non-console applications.
You must include the symbol reference in your object file explicitly. For example, if your
module contains the
main function, you can generate the correct symbol reference by adding
the following to the source code for the module:
extern int _cstart_;
void *dummy = &_cstart_;
00ProRef.book : 06chap03.fm Page 17 Monday, March 9, 1998 3:23 PM