milvus-sdk-cpp
milvus-sdk-cpp copied to clipboard
undefined references for grpc and google protobuf
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!
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 ...