BewareMyPower edited a comment on issue #14673: URL: https://github.com/apache/pulsar/issues/14673#issuecomment-1070361140
TL; DR the example code is wrong, we need to fix the doc. /cc @Anonymitaet You should add a declaration before `createProducer`: ```c++ Client client("pulsar://localhost:6650"); Producer producer; // **See here** Result result = client.createProducer("persistent://public/default/my-topic", producer); ``` ---- > there is a follow-up step called install Debian which I do not know what it is for (I am using Ubuntu) It's not a follow-up step. It's a parallel step. When you install a C++ SDK, it means following files need to be generated: - C++ headers (`*.h`) - C++ libraries, it can be either a dynamic library (`*.so` on Linux) or a static library (`*.a` on Linux). A `*.deb` file is a pre-built Debian C++ package. (Ubuntu is derived from Debian) i.e. the `apt install ./apache-pulsar-client.deb` command will install the C++ headers and libraries to the target directory. Since the pre-built Debian C++ package doesn't include a static library, you won't see a `*.a` file. However, if you have the source code of the C++ SDK, you can compile it by yourself, i.e. run `cmake` and `make` commands (or `./configure` for C++ libraries that use [GNU Autotools](https://en.wikipedia.org/wiki/GNU_Autotools) to build). At last, you need to run `make install`, which needs the superuser permission, to copy these files (`*.h`, `*.so`, `*.a`) to the target directory. You can also copy these files manually. In short, you can choose to either compile from source or install from a pre-built package. The advantage of compiling from source is that you can get the latest library. -- 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. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org