4ć13 – Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual
Page 40

Chapter 4
Programming Overview
4-13
For information on selecting or excluding the 8087 or 80287 math
coprocessor, please see the Borland manual sections on the –f options.
Our libraries are compatible with any –f option because they contain no
floating-point operations.
Example 1: Your program is called APPLIC.C. You have selected the
small (s) memory model. The combined command to compile and link
would be
BCC –N –K –w –ms –lcd applic.c 6008sisb.lib
Borland C++ will compile applic.c as applic.obj and link it as applic.exe.
Example 2: If your program is in several source modules, you can list
them on the command line. If you have chosen medium model, the
command is
BCC –N –K –w –mm –lcd control.c contr1.c contr2.c 6008simb.lib
The three source files will be compiled and linked as CONTROL.EXE.
Example 3: You have many source files –– U_D1.C, U_BT.C, and so on
–– to be compiled and linked in a program called U_D1B.EXE. Header
files are not in the same directory as source code, but are in directory
c:\dev\hdr. The following command will compile and link in small model.
BCC –N –K –w –ms –lcd –Ic:\dev\hdr –eU_D1B U_*.C 6008sisb.lib
This is quite similar to the command we used to create the U_D1B
program on your distribution disk.
The procedure is exactly the same as for Borland C++ 2.0, except that you
begin the command with TCC rather than BCC.
TCC –N –K –w –m%%%% –lcd yourprogname.c 6008si%%%%b.lib
Compiling and Linking the
Borland Turbo C++ 1.0 Version