blob: 775348a1d60016c04fb762242341a786fa2305de [file] [log] [blame]
Philip Liarda3802a32011-02-22 08:04:03 +00001C++ version of the libphonenumber project.
2Work in progress.
3
4This is a port of the Java version.
5
6This project uses some third-party code:
7 - src/base/ sources come from Chromium browser.
8 - src/utf/ sources come from lib9 which is also used in Go.
9
10Requirements:
11 - CMake build system
12 http://www.cmake.org
13
14 You can install it very easily on a Debian-based GNU/Linux distribution:
15 $ sudo apt-get install cmake
16
Philip Liardff0ef172011-03-04 08:43:24 +000017 - Protocol Buffers
18 http://code.google.com/p/protobuf/
Shaopeng Jia4628c702011-03-24 09:10:31 +000019 Version 2.4 or more recent is required.
Philip Liardff0ef172011-03-04 08:43:24 +000020
21 You can install it very easily on a Debian-based GNU/Linux distribution:
22 $ sudo apt-get install libprotobuf-dev
23
Shaopeng Jia4628c702011-03-24 09:10:31 +000024 Note: if your GNU/Linux distribution doesn't provide the needed package,
25 please download and install it manually:
26 $ tar xjf protobuf-2.4.tar.bz2
27 $ cd protobuf-2.4
28 $ ./configure && make && sudo make install
29
Philip Liardff0ef172011-03-04 08:43:24 +000030 - Google Test
31 http://code.google.com/p/googletest/
32
33 You can install it very easily on a Debian-based GNU/Linux distribution:
34 $ sudo apt-get install libgtest-dev
35
Philip Liarda3802a32011-02-22 08:04:03 +000036 - RE2
37 http://code.google.com/p/re2/
38
39 You can install it very easily on Ubuntu Maverick and later:
40 $ sudo apt-get install libre2-dev
41
42 Otherwise if you use a Debian-based distribution you can fetch the Ubuntu
43 package which should work:
44 http://packages.ubuntu.com/maverick/libre2-dev
45
46 If you want to install it manually:
47 You need Mercurial to checkout its source code:
48 $ sudo apt-get install mercurial
49
50 Then checkout, build and install it:
51 $ hg clone https://re2.googlecode.com/hg re2
52 $ cd re2
53 $ make test
54 $ make install
55 $ make testinstall
56
Philip Liard8e7e1b92011-03-03 14:35:27 +000057 - ICU
58 http://userguide.icu-project.org/
59
60 You can install it very easily on a Debian-based distribution:
61 $ sudo apt-get install libicu-dev
62
Philip Liarda3802a32011-02-22 08:04:03 +000063
64How to build libphonenumber C++:
65 $ cd libphonenumber
66 $ mkdir build
67 $ cd build
Philip Liardff0ef172011-03-04 08:43:24 +000068 $ cmake ../cpp/
Philip Liarda3802a32011-02-22 08:04:03 +000069 $ make