readme.txt
1Copyright (C) 2016 and later: Unicode, Inc. and others.
2License & terms of use: http://www.unicode.org/copyright.html
3
4Copyright (c) 2002-2005, International Business Machines Corporation and others. All Rights Reserved.
5numfmt: a sample program which displays number formatting in C and C++
6
7This sample demonstrates
8 Formatting a number
9 Outputting text in the default codepage to the console
10
11Files:
12 main.cpp Main source file in C++
13 capi.c C version
14 util.cpp formatted output convenience implementation
15 util.h formatted output convenience header
16 numfmt.sln Windows MSVC workspace. Double-click this to get started.
17 numfmt.vcproj Windows MSVC project file
18
19To Build on Windows
20 1. Install and build ICU
21 2. In MSVC, open the workspace file icu\samples\numfmt\numfmt.sln
22 3. Choose a Debug or Release build.
23 4. Build.
24
25To Run on Windows
26 1. Start a command shell window
27 2. Add ICU's bin directory to the path, e.g.
28 set PATH=c:\icu\bin;%PATH%
29 (Use the path to where ever ICU is on your system.)
30 3. cd into the numfmt directory, e.g.
31 cd c:\icu\source\samples\numfmt\debug
32 4. Run it
33 numfmt
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 cd <icu directory>/source/samples/numfmt
49 gmake ICU_PREFIX=<icu install directory)
50
51 To Run on Unixes
52 cd <icu directory>/source/samples/numfmt
53
54 gmake ICU_PREFIX=<icu install directory> check
55 -or-
56
57 export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
58 numfmt
59
60 Note: The name of the LD_LIBRARY_PATH variable is different on some systems.
61 If in doubt, run the sample using "gmake check", and note the name of
62 the variable that is used there. LD_LIBRARY_PATH is the correct name
63 for Linux and Solaris.
64
65