Open PunChaFeng opened 2 months ago
Hi @PunChaFeng , this is intentional.
We don't officially support consuming the C++ SDK as a shared library because we can't guarantee the symbols + ABI will remain stable. Specifically, if our release process causes an ABI change, we don't want to break any users who are consuming the built libraries.
In contrast, we do support using the C bindings in shared library.
But, I think it is fair that we could add a CMake option to enable this for people who can guarantee that the same build system is used for the shared libraries and their application.
Is that true for your use-case?
@cwaldren-ld Thank you for your detailed explanation. Your insights about the C++ SDK and the C bindings have helped me understand your intentions. I appreciate your suggestion about the CMake option, and yes, it would work for my use case.
Ok, I cannot promise any timeline but your request has been noted.
I will notify you if this is released.
Filed internally as 246572.
@cwaldren-ld Thank you. I created a PR to address this issue. Could you please review it?
Is this a support request? No.
Describe the bug Building hello-cpp-client with the shared C++ client library results in linking errors (Undefined symbols). I think it is because all the C++ symbols are hidden.
To reproduce
Build the project, hello-cpp-client and fails.
Expected behavior The project should be built correctly.
Logs
SDK version commit: 857dd28
Language version, developer tools C++17, CLion 2023.1.5, cmake version 3.27.6, boost 1.85.0
OS/platform Apple M1 Pro, MacOS 14.5 (23F79)
Additional context Removing
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
can resolve the issue. Why do we hide all the C++ symbols by default?