libphonenumber--windows上编译libphonenumber.lib以及使用(C++、VS2015)

再介绍一个谷歌的,自带光环的库–libphonenumber.

虽然这个库是用c++写的,但是我们在网络上很少见到在C++开发中使用这个库,或是说在windows开发中使用这个库。也就是几乎很难找到如何编译libphonenumber.lib 和 libphonenumber.dll.

所以,今天就要与大家分享一下,如何编译libphonenumber.lib,以及简单的使用。

libphonenumber简介

phonenumber是用于解析、格式化、存储和校验电话号码的Java、C++或 JavaScript类库。

Google’s common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers. The Java version is optimized for running on smartphones, and is used by the Android framework since 4.0 (Ice Cream Sandwich).

github地址:
https://github.com/googlei18n/libphonenumber

准备工作

我们先进入cpp:
https://github.com/googlei18n/libphonenumber/tree/master/cpp
看看这里的README,往下翻,你会感到很兴奋:

Building the library on Windows (Visual Studio)
-----------------------------------------------
The library was tested with Visual Studio 2010.

You will need to manually fetch and install the following dependencies:
  - CMake (tested with v2.8.6):
    http://cmake.org/cmake/resources/software.html
    * Download and install the Win32 installer.

  - Boost (tested with v1.44) from BoostPro:
    http://www.boostpro.com/download/
    * Select all the variants and Boost DateTime and Boost Thread during the
      installation process.
    See Linux instructions for information about thread-safety.

  - GTest (tested with v1.6.0):
    http://code.google.com/p/googletest/downloads/list
    * Open msvc/gtest-md.sln with Visual Studio and build the whole solution.

  - ICU (MSVC binaries, tested with v4.8.1):
    http://site.icu-project.org/download/48#ICU4C-Download
    * Simply extract t
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一苇渡江694

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值