readme.txt
1Copyright (C) 2016 and later: Unicode, Inc. and others.
2License & terms of use: http://www.unicode.org/copyright.html#License
3
4Copyright (c) 2002-2010, International Business Machines Corporation and others. All Rights Reserved.
5udata: Low level ICU data
6
7This sample demonstrates
8 Using the low level ICU data handling interfaces (udata) to create
9 and later access user data.
10
11Files:
12 writer.c C source for Writer application, will generate data file to be read by Reader.
13 reader.c C source for Reader application, will read file created by Writer
14 udata.sln Windows MSVC workspace. Double-click this to get started.
15 udata.vcproj Windows MSVC project file
16
17To Build udata on Windows
18 1. Install and build ICU
19 2. In MSVC, open the workspace file icu\samples\udata\udata.sln
20 3. Choose a Debug or Release build.
21 4. Build.
22
23To Run on Windows
24 1. Start a command shell window
25 2. Add ICU's bin directory to the path, e.g.
26 set PATH=c:\icu\bin;%PATH%
27 (Use the path to where ever ICU is on your system.)
28 3. cd into the udata directory, e.g.
29 cd c:\icu\source\samples\udata\debug
30 4. Run it
31 writer
32 reader
33 IMPORTANT: On some systems, the reader and writer executables may not be in the same directory. If this is the case, this will likely cause a problem with reader looking for the .dat file in the wrong directory).
34
35To Build on Unixes
36 1. Build ICU.
37 Specify an ICU install directory when running configure,
38 using the --prefix option. The steps to build ICU will look something
39 like this:
40 cd <icu directory>/source
41 runConfigureICU <platform-name> --prefix <icu install directory> [other options]
42 gmake all
43
44 2. Install ICU,
45 gmake install
46
47 3. Compile
48 You will need to set ICU_PATH to the location of your ICU source tree, for example ICU_PATH=/home/srl/icu (containing source, etc.)
49 cd <icu directory>/source/samples/udata
50 gmake ICU_PATH=<icu source directory> ICU_PREFIX=<icu install directory)
51
52 To Run on Unixes
53 cd <icu directory>/source/samples/udata
54 gmake ICU_PREFIX=<icu install directory> check
55 -or-
56
57 export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
58 writer
59 reader
60
61 Note: The name of the LD_LIBRARY_PATH variable is different on some systems.
62 If in doubt, run the sample using "gmake check", and note the name of
63 the variable that is used there. LD_LIBRARY_PATH is the correct name
64 for Linux and Solaris.
65
66