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

Chapter 4 External Subroutines

Compiling the External Subroutine

Macintosh

THINK C Compiler and CodeWarrior 68K Compiler

To make a subroutine using the THINK C Compiler, create a project named sum and add sum.c and LVSBLib to the project. Do not include the CINLib file in your project. Set the options in the Options... and Set Project Type dialog boxes as described in the Steps for Creating a CIN section of Chapter 1, CIN Overview. After you create sum.tmp, run lvsbutil.app and select the Subroutine option.

MPW Compiler

As described in the External Subroutine section of this chapter, you compile an external subroutine the same way you compile a CIN. The first step is to create a makefile specification. Following are the contents of the makefile specification for this example. Notice that all Dir commands must end with a colon (:). Name the file sum.lvm.

name

=

name

sum

type

=

type

LVSB

codeDir = codeDir: Complete pathname to the folder containing the .c file.

cinToolsDir = cinToolsDir:

 

Complete or partial pathname to the

 

LabVIEW cintools folder.

inclDir = inclDir:

(optional) Complete or partial

 

pathname to a folder containing any

 

additional .h files.

Create the subroutine using the following command.

Directory <full pathname to CIN directory>

cinmake sum

LabVIEW Code Interface Reference Manual

4-8

© National Instruments Corporation

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