NonStop XML Parser User Guide

Perform the following steps before building the samples:
Copy the samples directory and sub-directories to an OSS location where you have read,
write, and execute permissions. This location is referred to as
<icu_user_location>/samples.
Set the ICUROOT and ICU_DATA environment variables by entering the following commands:
OSS> export ICUROOT=/usr/tandem/xml/T0970H01/icu
OSS> export ICU_DATA=$ICUROOT/share/icu/50.1.2/
You can build the samples with different combinations of libraries that are available. You can
compile the samples by setting the values of the FLOAT and VERSION variables in the
<icu_user_location>/samples/defs.mk file. For a sample defs.mk file, see appendix
“Sample defs.mk file” (page 17).
The following table lists the valid values for these variables. You can define a combination of these
values for building the samples. Default values are set in the defs.mk file. If you do not change
these values, the default values are used.
Valid valuesVariable
ieee, tandem. Default is ieee.FLOAT
2, 3. Default is 3.VERSION
NOTE:
The value of each variable in the defs.mk file is case sensitive.
There is no support for ICU on Guardian platform.
After setting the required values, execute the following command to build all samples from the
<icu_user_location>/samples directory:
OSS> make all
To build a particular sample, use the following command:
OSS> make <sample_name>-sample
ICU configuration helper script
The ICU configuration helper script (icu-config script) is available in the bin folder of each
ICU variant. It simplifies the task of building and linking the object files against ICU as compared
to manually configuring user makefiles or equivalent. As icu-config is an executable script, it
locates the ICU libraries and headers by using the system PATH variable. Using icu-config is
convenient for trivial, single-file programs using ICU.
icu-config can be used with or without a makefile. If it is used without a makefile, the following
command is sufficient for building a single-file C++ program against ICU (For example,
icu/source/samples/ufortune/ufortune.cpp):
`icu-config --cxx --cxxflags --cppflags --ldflags` -o ufortune
ufortune.cpp
Mostly, icu-config is called from within a makefile, and used to set up variables.
For more information on icu-config tool, see icu-config --help.
Running the ICU samples
When you build the samples, the executable files are created in the
<icu_user_location>/samples/<sample-dir> directory, where <sample-dir> is the
respective directory of each sample.
14 Sample applications