Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
The Development Environment
Open System Services Porting Guide520573-006
2-15
C and C++ Compilation Using the c89 Utility
Native c89 Standard Include Directories
The standard C and C++ header files for the native C compilers are in the
/usr/include directory for the OSS environment; for UNIX workstations, they are in
the /usr/vendor/tndm_complrs/usr/include directory.
Native c89 Standard Library Directories
For native environments, the linker searches a list of standard library directories. For
the OSS environment, the default directories are /lib, /usr/lib, and
/usr/local/lib.
Native c89 Installation Locations
Beginning with the D40.00 RVU, the TNS/R native c89 utility is installed in the
/usr/bin directory by default. The H-series TNS/E native c89 utility is also installed
in the /usr/bin directory by default.
TNS c89 Standard Include Directories
The standard C and C++ header files for the TNS C compiler are in the
/usr/include directory for the OSS environment.
TNS c89 Standard Library Directories
For TNS c89, the linker searches a default list of standard library directories specified
by -L flags. For the G-series OSS environment, it is the /nonnative/usr/lib
directory. When using the -L flag, c89 searches the default library directories after
those specified by the -L flag.
TNS c89 Installation Locations
Beginning with the D40.00 RVU, the c89 utility for generating TNS object files is
installed in the /nonnative/usr/bin directory by default.
c89 Utility Examples
The following example compiles test.c and produces an a.out executable file:
c89 test.c
The following example compiles source code modules x.c, y.c, and z.c; links
the object files into an executable file called tst; and produces symbolic
information for debugging:
c89 -g -o tst x.c y.c z.c
The following example compiles file.c and links the native object file into an
executable file called a.out in the current working directory. The native C compiler
is used.
c89 file.c -lc -WBstatic -larchive -WBdynamic -lnative