You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Philippe Liard b59d9080ab Changing license to Libphonenumber Authors. 15 years ago
..
src Changing license to Libphonenumber Authors. 11 years ago
test/phonenumbers Changing license to Libphonenumber Authors. 11 years ago
CMakeLists.txt Changing license to Libphonenumber Authors. 11 years ago
LICENSE Changing license to Libphonenumber Authors. 11 years ago
README CPP:Update README on ICU version. 11 years ago

README

C++ version of the libphonenumber project.
Work in progress.

This is a port of the Java version.

This project uses some third-party code:
- src/base/ sources come from Chromium browser.
- src/utf/ sources come from lib9 which is also used in Go.

Requirements:
- CMake build system
http://www.cmake.org

You can install it very easily on a Debian-based GNU/Linux distribution:
$ sudo apt-get install cmake

- Protocol Buffers
http://code.google.com/p/protobuf/
Version 2.4 or more recent is required.

You can install it very easily on a Debian-based GNU/Linux distribution:
$ sudo apt-get install libprotobuf-dev

Note: if your GNU/Linux distribution doesn't provide the needed package,
please download and install it manually:
$ tar xjf protobuf-2.4.tar.bz2
$ cd protobuf-2.4
$ ./configure && make && sudo make install

- Google Test
http://code.google.com/p/googletest/

You can install it very easily on a Debian-based GNU/Linux distribution:
$ sudo apt-get install libgtest-dev

- RE2
http://code.google.com/p/re2/

You can install it very easily on Ubuntu Maverick and later:
$ sudo apt-get install libre2-dev

Otherwise if you use a Debian-based distribution you can fetch the Ubuntu
package which should work:
http://packages.ubuntu.com/maverick/libre2-dev

If you want to install it manually:
You need Mercurial to checkout its source code:
$ sudo apt-get install mercurial

Then checkout, build and install it:
$ hg clone https://re2.googlecode.com/hg re2
$ cd re2
$ make test
$ make install
$ make testinstall

- ICU
Version 4.4 or more recent is required.
It can be built from sources. You need to download the source tarball at
this location:
http://site.icu-project.org/download
Then you can extract, build and install it this way:
$ tar xzf icu4c-4_4_2-src.tgz
$ cd icu/source
$ ./configure && make && sudo make install

If you have a Debian-based distribution providing an up-to-date version of
ICU, you can install it using apt-get:
$ sudo apt-get install libicu-dev

- Boost
Version 1.40 or more recent is required.

You can install it very easily on a Debian-based GNU/Linux distribution:
$ sudo apt-get install libboost1.40-dev libboost-thread1.40-dev

Note: Boost Thread is the only library needed at link time.

How to build libphonenumber C++:
$ cd libphonenumber
$ mkdir build
$ cd build
$ cmake ../cpp/
$ make

Supported build parameters:
Build parameters can be specified invoking CMake with '-DKEY=VALUE' or using a
CMake user interface (ccmake or cmake-gui).

USE_LITE_METADATA = ON | OFF [OFF] -- Generates smaller metadata that doesn't
include example numbers.