0

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.

personne3000
  • 1,780
  • 3
  • 16
  • 27

1 Answers1

2

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

Bhaskar
  • 36
  • 1
  • Thanks for your answer; I see that there were improvements in commit 94f837444ae8f9ed26acca33ff21d7d93f9b2178 already ! I ended up putting the include dir, the libiota root dir (for headers in the platform/ subdir), and the third_party/jsmn dir in the search path to have everything compile. – personne3000 Mar 01 '17 at 14:12