Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Labview Code Interface Reference Manual.pdf
Скачиваний:
33
Добавлен:
29.05.2015
Размер:
1.13 Mб
Скачать

Chapter 1 CIN Overview

Although LabVIEW for Solaris 2.x and HP-UX support external routines, it is recommended that you use UNIX shared libraries instead, because they are a more standard library format.

Supported Languages

The interface for CINs and external subroutines supports a variety of compilers, although not all compilers can create code in the correct executable format.

External code must be compiled as a form of executable that is appropriate for a specific platform. The code must be relocatable, because LabVIEW loads external code into the same memory space as the main application.

Macintosh

LabVIEW for the Macintosh uses external code as a customized code resource (for 68K) or shared library (for Power Macintosh) that is prepared for LabVIEW using the separate utilities lvsbutil.app for THINK C and Metrowerks CodeWarrior, and lvsbutil.tool for the Macintosh Programmer’s Workshop. These utilities are included with LabVIEW.

The LabVIEW utilities and object files are known to be compatible with the three major C development environments for the Power Macintosh, which are as follows:

THINK C, versions 5, 6, and 7, and Symantec C++ version 8 for Power Macintosh, from Symantec Corporation of Cupertino, CA

Metrowerks CodeWarrior from Metrowerks Corporation of Austin, Texas

Macintosh Programmer’s Workshop (MPW) from Apple Computer, Inc. of Cupertino, CA

LabVIEW header files are compatible with these three environments.

Header files may need modification for other environments.

CINs compiled for the 68K Macintosh will not be recognized by

LabVIEW for the Power Macintosh, and vice versa.

LabVIEW does not currently work with fat binaries (a format that includes multiple executables in one file, in this case both 68K and Power Macintosh executables).

© National Instruments Corporation

1-3

LabVIEW Code Interface Reference Manual

Chapter 1 CIN Overview

Microsoft Windows 3.1

LabVIEW for Windows supports external code compiled as a.REX file and prepared for LabVIEW using an application included with LabVIEW. This application requires dos4gw.exe, which comes with Watcom. LabVIEW is a 32-bit, flat memory-model application, so you must compile external code for a 32-bit memory model when you install the Watcom C compiler.

Watcom C is the only LabVIEW-supported compiler that can create 32-bit code of the correct format.

Microsoft Windows 95 and Windows NT

You can use CINs in LabVIEW for Windows 95/NT created with any of the following compilers.

The Win32 Microsoft SDK (Software Developer’s Kit) C/C++ command line compiler for Windows NT.

See the Microsoft Windows 95 and Windows NT subsection of the Compile the CIN Source Code section of this chapter for information on how to create a CIN using this compiler.

The Visual C++ for Windows NT C compiler.

Use the same instructions as you would for the Microsoft C command line compiler. You also must add an IDE=VC line to the beginning of your.lvm file. See the Microsoft Windows 95 and Windows NT subsection of the Compile the CIN Source Code section of this chapter for information on how to create a CIN using this compiler.

The Watcom C/386 compiler for Windows 3.1.

With proper preparation, you can use CINs created using the Watcom C compiler for Windows 3.1 with LabVIEW for Windows 95/NT. See the Microsoft Windows 95 and Windows NT subsection of the Compile the CIN Source Code section of this chapter for more information on using the Watcom C compiler for Windows 3.1.

Note: Under Windows 95 and Windows NT, you should not call CINs created using the Watcom complier that call DLLs and system functions or that access hardware directly. The technique Watcom uses to call such code under Windows 3.1 does not work under Windows 95 or Windows NT.

LabVIEW Code Interface Reference Manual

1-4

© National Instruments Corporation

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]