HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 4 (of 101)
Chapter 11 Software Development
October 29, 2013
Preface
This chapter is intended to give an overview over issues on software development in general, and
on HP-UX in particular. It is not intended to teach programming languages, and if at all, only
basic skills in programming languages, and probably a little shell programming know-how are
required to understand its contents.
The Software Development chapter covers topics like building a program, program execution,
products and tools are available on HP-UX for software development, common problems and
approaches how to solve them.
The Build Process
The process to build an executable program consists basically of the following steps:
Source
Object
Linker
Executable
A programmer writes a program in his preferred programming language. The program code is
stored in an ASCII file usually called the source file. Because the processor does not understand
programming languages, the source code must be converted into machine code. This is what the
compiler does. It creates the object file which contains the machine code and a table of contents
and references. Usually a program is made from multiple objects, each having contents and
references. The linker creates the executable from the objects by binding references to contents.
For easier creation of executables every compiler comes with a so-called front-end command. It
is used as a single interface to do one or more steps of the build process at once. It knows which
default parameters to pass to each build step to ease the creation of an executable program from a
source file.
The compiler front-ends know various input file types and distinguish them by their file name
extension. They will pass them directly to the appropriate sub-process:
File Type
Subprocess
Extensions
source files
preprocessor (if used by the
language)
C: .c
aC++: .C, .cc, .cpp, .cxx
Fortran: .f, .F, .f90
intermediate files
compiler
.i, .o
all other files
linker
any