To link-edit a z/OS UNIX C/C++ application's
object modules to produce an executable file, specify the c89 utility
and pass it object modules (file.o z/OS UNIX files
or //file.OBJ MVS™ data sets).
The c89utility recognizes that these are object modules
produced by previous C/C++ compilations
and does not invoke the compiler for them.
To compile source files without link-editing them, use the c89 -c option
to create object modules only. You can use the -o option
with the command to specify the name and location of the executable
file to be created.
For a complete description of all the
c89 options,
see
z/OS UNIX System Services Command Reference.
- To link-edit an XPLINK-compiled application object module to create
the mymodx.out executable file in the current directory,
specify:
c89 -o mymodx.out -Wl,xplink usersource.o
- To link-edit an application object module to create the default
executable file a.out in the working directory, specify:
c89 usersource.o
- To link-edit an application object module to create the mymod.out executable
file in the app/bin directory, relative to your working
directory, specify:
c89 -o app/bin/mymod.out usersource.o
- To link-edit several application object modules to create the mymod.out executable
file in the app/bin directory, relative to your working
directory, specify:
c89 -o app/bin/mymod.out usersrc.o ottrsrc.o "//PGM.OBJ(PW...APP)"
- To link-edit an application object module to create the MYLOADMD
executable member of the MVS APPROG.LIB
data set for your user ID, specify:
c89 -o "//APPROG.LIB(MYLOADMD)" usersource.o
- To compile and link-edit an application source file with several
previously compiled object modules to create the executable file zinfo in
the approg/lib subdirectory, relative to your working
directory, specify:
c89 -o approg/lib/zinfo usersrc.c existobj.o
"//PGM.OBJ(PWAPP)"