Jennifer88huang commented on a change in pull request #8919:
URL: https://github.com/apache/pulsar/pull/8919#discussion_r547079344



##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,99 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+
 ## Linux
 
+### Compilation 
+
+1. Clone the Pulsar repository.
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+2. Install all necessary dependencies.
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+3. Compile and install [Google Test](https://github.com/google/googletest).
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+With a successful installation, the files `libpulsar.so` and `libpulsar.a` 
will be in the `lib` folder of the repository. The tools `perfProducer` and 
`perfConsumer` will be in the `perf` directory.
+
+### Install Dependencies
+
 > Since 2.1.0 release, Pulsar ships pre-built RPM and Debian packages. You can 
 > download and install those packages directly.
 
-Four kind of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb download 
and install.
-By default, they are build under code path `${PULSAR_HOME}/pulsar-client-cpp`, 
using command
- `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`
-These libraries rely on some other libraries, if you want to get detailed 
version of dependencies libraries, please reference 
[these](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 
[files](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile).
+The `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and 
`libpulsarwithdeps.a` libraries are included in your `/usr/lib` after RPM or 
DEB being downloaded and installed.
+
+By default, they are built under code path `${PULSAR_HOME}/pulsar-client-cpp`. 
The building command is as below.

Review comment:
       under --> in
   in the xxx path




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to