Tools to use, Tools to use -4, Sample dos make file for borland compilers -4 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 26: Sample dos make file for borland compilers

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

2-4 Using the API

Tools to Use

The API functions support both Microsoft and Borland C compilers.
The API disk includes sample MAKE files for each compiler.

When you use the DOS API and link to

ocapil.lib

, use the

appropriate command-line switch to select the large memory model.
For more information, see your user manual for your compiler.

If you plan to use a programming language other than C, make sure
the programming language follows the appropriate calling convention
(Pascal for the DOS API; Win32 _stdcall for Windows NT). After you
write your application, use your compiler to link to

ocapil.lib

(DOS) or

ocapi.lib

(Windows NT).

The follow pages offer sample MAKE files for DOS and Windows NT
systems on Microsoft and Borland compilers.

Sample DOS MAKE file for Borland compilers

The following sample file shows how to use a Borland MAKE file. The
bold headings indicate the statements you need to modify for your
environment.

#************************************************************************
#
#

Title: Makefile for Open Controller API Sample

#
# Abstract:
# This file is used by the Borland MAKE utility to build the
# sample application.
#
# Environment:
# 1747-OCE Open Controller
# MS-DOS

# Borland C/C++ Compiler (16-bit)

#

#************************************************************************
#

# Paths to Tools

#
# Note: Modify the following paths to
# correspond to your environment.
#
#----------------------------------------------
CPATH = D:\BC5 # Location of Borland tools
CC = $(CPATH)\bin\Bcc # compiler
LINK = $(CPATH)\bin\TLink # linker
MAKE = $(CPATH)\bin\Make # make utility

#----------------------------------------------
# Path to API Library and Include file
#
# Note: Modify the following path to
# correspond to your environment.
#
#----------------------------------------------
APILIB = ..\ocapil.lib # Path to Open Controller API library

Advertising
This manual is related to the following products: