To run the DOGMAIN.C client program, it needs to be compiled and linked with the SOM library and the Dog class implemented in DOG.C. DOG.C is a file generated by the SOM compiler after processing DOG.IDL, and subsequently modified by the class implementor.
The program can be compiled using the IBM CSet/2 compiler. The command line illustrated in the following command line shows how to compile the program assuming that the LIB and INCLUDE environment variables contain the Toolkit directories:
icc -Fe dog dogmain.c dog.c somtk.lib
These environment variables are generally set appropriately after the Toolkit is installed. If the environment variables do not contain the correct libraries, the steps sequence shown in the following command lines are required:
/* Assuming X:\TOOLKIT is the drive and directory */ /* where the toolkit and SOM are installed */ set sombase=X:\TOOLKIT set lib=%sombase%\LIB;%lib% icc -I. -I%sombase%\INCLUDE dog domain.c dog.c somtk.lib
The output from the client program is shown in the following figure:
My breed is Yorkshire Terrier I say Unknown Dog Noise