[英]Including headers with libiota
I built libiota as instructed in the weave guide , and installed it using: 我按照编织指南中的指示构建了libiota,并使用以下命令进行了安装:
make -j lib
sudo make install
This installed /usr/bin/libiota.a and header files in /usr/include/iota/. 这将/usr/bin/libiota.a和头文件安装在/ usr / include / iota /中。
Now I am trying to compile the following simple program (main.cc): 现在,我正在尝试编译以下简单程序(main.cc):
#include <iota/daemon.h>
int main(int argc, char** argv) {
return 0;
}
with: g++ main.cc
使用:
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... 显然goog_device.h包含一个相对于/ usr /的文件,而不是/ 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. 我正在使用2017年2月2日提交的b53901b6cc516941f1432da030eb3c76c213fbea提交。
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?
您现在可以在应用程序的生成文件中添加-I / usr /的包含路径作为解决方法吗?
thanks Bhaskar 谢谢Bhaskar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.