Community articleRunning Calculate Age Under C on AIX, Linux, and Solaris
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Perform the following steps to set up and run the Calculate Age sample under C on AIX®, Linux™, and Solaris systems.
  1. Switch to the directory:
  2.    <API Installation Folder>/samples/<UNIX OS>/form/demo/calculate_age/

  3. To view XFDL forms you must use a computer running Windows. Copy the file calculateAge.xfd to a computer running Windows.
  4. In Windows, use the Viewer to open calculateAge.xfd.
  5. Change the name and birth date if you want, then save and close the form.
  6. If you changed the values in the form, copy the saved form back to the original directory on your UNIX computer.
  7. Create the makefile by typing xmkmf at the command prompt and press Enter.
  8. At the command prompt, type make and press Enter.
    • This will build the application file (calculateAge).
  9. To run the sample application, type ./calculateAge and press Enter.
    • This will create a form called output.xfd.
  10. Copy the file output.xfd to a computer running Windows.
  11. In Windows, use the Viewer to open the output.xfd form and check the number in the Age field.