Search code examples
c++google-weave

Including headers with libiota


I built libiota as instructed in the weave guide, and installed it using:

make -j lib
sudo make install

This installed /usr/bin/libiota.a and header files in /usr/include/iota/.

Now I am trying to compile the following simple program (main.cc):

#include <iota/daemon.h>

int main(int argc, char** argv) {
  return 0;
}

with: g++ main.cc

and I get the following error:

In file included from /usr/include/iota/daemon.h:28:0,
                 from main.cc:1:
/usr/include/iota/schema/traits/goog_device.h:27:58: fatal error: include/iota/schema/traits/goog_device_enums.h: Aucun fichier ou dossier de ce type
 #include "include/iota/schema/traits/goog_device_enums.h"
                                                          ^
compilation terminated.

Apparently goog_device.h includes a file relative to /usr/ and not /usr/include...

Is there something wrong with my usage of the library ? What is the recommended way to include header files ?

I am using commit b53901b6cc516941f1432da030eb3c76c213fbea, from February 2nd 2017.


Solution

  • This seems to be an issue in the way we have included headers. We will fix this in a future release. Could you please add an include path to -I/usr/ in your application make-file as a workaround for now?

    thanks Bhaskar