C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

Table 40 TNS c89 Operands (continued)
A shared run-time library produced by Binder. The shared run-time library is used
by the Binder to resolve external references.
file.so
In the static binding mode, search for the library named liblibrary.a. In the
dynamic binding mode, search for the library named liblibrary.so. If
-l library
liblibrary.so is not found, liblibrary.a is used. For example, if you use
the operand -l cre,the libraries searched for are libcre.a and libcre.so.A library is
searched when its name is encountered, so the placement of a -l operand is
significant.
Input Files
Input files to TNS c89 can be:
C++ language source files
TNS object files generated by c89 -c
Libraries of TNS object files produced by the ar utility
Libraries of TNS object files produced by Binder
Executable TNS object files produced by Binder
Binding
The -lc and -lC operands specify these libraries:
This library contains all library functions specified in the POSIX.1 specification, except for those functions
listed as residing in math.h.
-lc
This is the TNS C++ run-time library. It should be bound before the standard TNS C run-time library.-lC
In the absence of options that inhibit the invocation of the Binder, such as -c or -Wnobind, the
TNS c89 utility causes the equivalent of a -lc operand to be passed to the Binder as the last -l
operand, causing the standard TNS C library to be searched after all other object files and libraries
are loaded.
If one or more of the file operands are C++ source files, TNS c89 causes the equivalent of a -lC
operand to be passed to the Binder ahead of -lc. However, if a separate binding process is
invoked to bind C++ TNS object files, you are required to specify -lC as one of the file operands
ahead of -lc. If you do not specify -lC ahead of -lc only the standard TNS C run-time library
is used by the Binder.
Examples
Examples 1 and 2 shows how to compile a C++ program using the TNS c89 utility. Example 3
shows how to perform some of the compilation steps without performing all of them.
1. This example preprocesses hello.C with Cprep, translates it with Cfront, compiles it with
TNS C, and then binds it with the Binder to create an executable file named a.out.
c89 hello.C
2. This example causes the same compilation steps to occur as in the previous example except
that the resulting executable file is named hello.
c89 -o hello hello.C
3. This example preprocesses hello.C with Cprep and translates it with Cfront. The output from
Cfront is saved in a file named hello.i. No compilation by the TNS C compiler is performed
because the -Wcfonly flag has been specified.
c89 -Wcfonly -o hello.i hello.C
284 Compiling, Binding, and Accelerating TNS C++ Programs