To compile and bind a XL C/C++ application program in one step to produce an executable file, specify c89 or c++ without specifying the -c option. You can use the -o option with the command to specify the name and location of the application program executable file that will be created. The c++ and cxx commands are identical. You can use cxx instead of c++ in all the examples that are shown in this topic. If you are using the xlc utility, you can also use the xlc and xlc++ commands, which are identical to c++ and cxx.
The c89 utility and xlc utility invoke the binder by default, unless the output file of the link-editing phase (-o option) is a PDS, in which case the prelinker is used.
c89 usersource.c
c++ usersource.C
c89 -Wc,lp64 -Wl,lp64 usersource.c
c++ -Wc,lp64 -Wl,lp64 usersource.C
xlC_64 usersource.C
c89 -o /app/bin/mymod.out usersource.c
c++ -o /app/bin/mymod.out usersource.C
c89 -o /app/bin/mymod.out usrsrc.c otsrc.c "//'MUSR.C(PWAPP)'"
c++ -o /app/bin/mymod.out usrsrc.C otsrc.C "//'MUSR.C(PWAPP)'"
c89 -o "//'APPROG.LIB(MYLOADMD)'" usersource.c
c++ -o "//'APPROG.LIB(MYLOADMD)'" usersource.C
c89 -o /prg/lib/zinfo usrsrc.c xstobj.o "//'MUSR.OBJ(PWAPP)'"
c++ -o /prg/lib/zinfo usrsrc.C xstobj.o "//'MUSR.OBJ(PWAPP)'"
c89 -V barryl.c > barryl.lst
c++ -V barryl.C > barryl.lst