Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined references for grpc and google protobuf #241

Open
Lllll921 opened this issue Jun 27, 2023 · 1 comment
Open

undefined references for grpc and google protobuf #241

Lllll921 opened this issue Jun 27, 2023 · 1 comment

Comments

@Lllll921
Copy link

Hi, I have installed Milvus C++ sdk on my machine. But when I compile my project, it shows undefined reference to 'grpc::xxx‘ or undefined reference to 'google::protobuf::xx' even though I have include the grpc++ and protobuf library in my CMakeLists. Can you provide the solution for this problem? Thanks!

@matrixji
Copy link
Collaborator

matrixji commented Jul 3, 2023

By default, the milvus-cpp-sdk are compiled with static lib. So you need to link grpc++ again in your project.
I good solution is to switch to shared library for milvus-cpp-sdk. You could try adding -DBUILD_SHARED_LIBS=YES during cmake.

I'm not very sure if we need change the default with BUILD_SHARED_LIBS=YES ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants