Giter VIP home page Giter VIP logo

Comments (7)

ashish-billore avatar ashish-billore commented on July 25, 2024

I see this file does exists, still build fails for not finding it:

root@lb-prof:~/etcd# ls -ltrh /usr/local/include/etcd/proto/google/api/http.pb.h
-rw-r--r-- 1 root root 61K Jan 31 21:44 /usr/local/include/etcd/proto/google/api/http.pb.h
root@lb-prof:~/etcd# 

I manually then updated the file:

`/usr/local/include/etcd/proto/google/api/annotations.pb.h'

as:

#include "http.pb.h" instead of original: #include "google/api/http.pb.h"

and then it compiled.

Wondering, if this is right way or expected while using etcd-cpp-apiv3 in any program.
Please suggest?

from etcd-cpp-apiv3.

sighingnow avatar sighingnow commented on July 25, 2024

Hi @ashish-billore,

Assuming you are installing etcd-cpp-apiv3 library into /usr/local, you need to add /usr/local/include as well as /usr/local/include/etcd to the compiler flags, as

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.

from etcd-cpp-apiv3.

sighingnow avatar sighingnow commented on July 25, 2024

Wondering, if this is right way or expected while using etcd-cpp-apiv3 in any program.

Assuming you are working with CMake, you just need to add another include directory.

from etcd-cpp-apiv3.

ashish-billore avatar ashish-billore commented on July 25, 2024

Thanks @sighingnow I'll follow your suggestion to compile with:

g++ -I/usr/local/include -I/usr/local/include/etcd

from etcd-cpp-apiv3.

sighingnow avatar sighingnow commented on July 25, 2024

Hi @ashish-billore,

I would like to know if providing a cmake module to make find_package(etcd) work and set a CMake variable ETCD_INCLUDE_DIRS helps for you case.

from etcd-cpp-apiv3.

ashish-billore avatar ashish-billore commented on July 25, 2024

Sure, that sounds good too.

from etcd-cpp-apiv3.

ashish-billore avatar ashish-billore commented on July 25, 2024

@sighingnow After compiling as above, when I try to run the application, I get a core dump.
I create another issue for that: #40 since the compilation is done.
Please have a look, thanks!

from etcd-cpp-apiv3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.