Skip to content

Commit

Permalink
[Doc] Fix Pulsar c++ client windows build docs (#11705)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
gaoran10 committed Aug 21, 2021
1 parent 36667f8 commit d10100f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pulsar-client-cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 31 additions & 0 deletions site2/docs/client-libraries-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d10100f

Please sign in to comment.