From d10100f2fcded846830a884c4c27885e0420d746 Mon Sep 17 00:00:00 2001 From: ran Date: Sat, 21 Aug 2021 08:27:18 +0800 Subject: [PATCH] [Doc] Fix Pulsar c++ client windows build docs (#11705) ### Motivation Currently, docs that the Pulsar c++ client windows building-related docs are not complete. ### Modifications Add Pulsar c++ client windows building steps in Apache Pulsar website. Add Pulsar c++ client windows building result check section. --- pulsar-client-cpp/README.md | 20 +++++++++++++++++++ site2/docs/client-libraries-cpp.md | 31 ++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/pulsar-client-cpp/README.md b/pulsar-client-cpp/README.md index 6316df0ce5d51..a25db9b05d34a 100644 --- a/pulsar-client-cpp/README.md +++ b/pulsar-client-cpp/README.md @@ -235,6 +235,26 @@ ${PULSAR_PATH}/pulsar-client-cpp/cmake -DPROTOC_PATH=C:/protobuf/bin/protoc -DCM #This will generate pulsar-cpp.sln. Open this in Visual Studio and build the desired configurations. ``` +#### Checks + +##### Client libraries are available in the following places. +``` +${PULSAR_PATH}/pulsar-client-cpp/build/lib/Release/pulsar.lib +${PULSAR_PATH}/pulsar-client-cpp/build/lib/Release/pulsar.dll +``` + +#### Examples + +##### Add windows environment paths. +``` +${PULSAR_PATH}/pulsar-client-cpp/build/lib/Release +${PULSAR_PATH}/pulsar-client-cpp/vcpkg_installed +``` + +##### Examples are available in. +``` +${PULSAR_PATH}/pulsar-client-cpp/build/examples/Release +``` ## Tests ```shell diff --git a/site2/docs/client-libraries-cpp.md b/site2/docs/client-libraries-cpp.md index b161365bbc950..de6fbb52cf5b1 100644 --- a/site2/docs/client-libraries-cpp.md +++ b/site2/docs/client-libraries-cpp.md @@ -234,6 +234,37 @@ Pulsar releases are available in the [Homebrew](https://brew.sh/) core repositor brew install libpulsar ``` +## Windows (64-bit) + +### Compilation + +1. Clone the Pulsar repository. + +```shell +$ git clone https://github.com/apache/pulsar +``` + +2. Install all necessary dependencies. + +```shell +cd ${PULSAR_HOME}/pulsar-client-cpp +vcpkg install --feature-flags=manifests --triplet x64-windows +``` + +3. Build C++ libraries. + +```shell +cmake -B ./build -A x64 -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF -DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -S . +cmake --build ./build --config Release +``` + +4. Client libraries are available in the following places. + +``` +${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.lib +${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.dll +``` + ## Connection URLs To connect Pulsar using client libraries, you need to specify a Pulsar protocol URL.