-
Notifications
You must be signed in to change notification settings - Fork 123
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
Compilation fails with: google/api/http.pb.h: No such file or directory #37
Comments
I see this file does exists, still build fails for not finding it:
I manually then updated the file: `/usr/local/include/etcd/proto/google/api/annotations.pb.h' as:
and then it compiled. Wondering, if this is right way or expected while using |
Hi @ashish-billore, Assuming you are installing etcd-cpp-apiv3 library into g++ -I/usr/local/include -I/usr/local/include/etcd That is a bit annoying, but the fixes is not very easy. We want to keep the same package name, module name and file structures with etcd ifself (that means, when we update protobuf files, we just need to copy them, without any changes). The include path in headers is generated by protoc, not ourself. I think adding a nother include directory should be usually fine enough. |
Assuming you are working with CMake, you just need to add another include directory. |
Thanks @sighingnow I'll follow your suggestion to compile with:
|
Hi @ashish-billore, I would like to know if providing a cmake module to make |
Sure, that sounds good too. |
@sighingnow After compiling as above, when I try to run the application, I get a core dump. |
…uf/grpc files. Add CMake config files to make it looks as a cmake module. Fixes etcd-cpp-apiv3#37. Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
…uf/grpc files. Add CMake config files to make it looks as a cmake module. Fixes etcd-cpp-apiv3#37. Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
…uf/grpc files. Add CMake config files to make it looks as a cmake module. Fixes etcd-cpp-apiv3#37. Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
I followed the instructions to build and install the etcd-cpp-apiv3 package on Ubuntu 18.04 following the steps:
Build and install completed successfully without errors.
After that I created a test program like this, following snippet from here
I try to compile like this:
g++ test.cpp -o test_etcd -lpthread -letcd-cpp-api -lprotobuf -lgrpc++ -lgrpc -lz -lcpprest -lssl -lcrypto -lboost_system
However, I get error like this:
I already installed proto and grpc libs and expected it to work, can anyone suggest what is missing here?
The text was updated successfully, but these errors were encountered: