Use the following syntax examples to compile and link a C INMOD on an HP-UX Itanium-based client.
Compile Syntax
where the following is true:
- cc
- Invokes the native UNIX C compiler
- +ul
- Is a compiler option that allows pointers to access non-natively aligned data
- -D_REENTRANT
- Ensures that all the Pthread definitions are visible at compile time
- +DD64
- Generates 64-bit object code for PA2.0 architecture
- -c
- Compiles one or more source files but does not enter the linking phase
- inmod.c
- A C source module for the INMOD
Link Syntax
where the following is true:
- ld
- Invokes the UNIX linker editor
- -n
- Generates an executable with file type SHARE_MAGIC
- -b
- Is a linker option specified to generate a shared object file
- inmod.o
- Is an object module derived from the compile step
- -lc
- Search a library libc.a, libc.so, or libc.sh
- -o
- Specifies the output filename; default is a.out
- inmod.so
- Specifies the resulting shared object module