编译时出错,头文件endian.h上有重复成员 [英] Error compiling, duplicate member on header, endian.h

查看:35
本文介绍了编译时出错,头文件endian.h上有重复成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用FingerPrinter SDK,它显示了一个在linux上运行它的示例,我在linux上运行它,因为它比Windows更可自定义,很好,我遵循了所包含的所有说明来进行构建和编译,但是出现此错误.这些SDK使用libusb库和一些usb规则,两者均已完美安装并被允许.希望能有所帮助.

I am trying work with FingerPrinter SDK, it shows an example to runs it on linux, i run it on linux cuz its more customizable than windows, well i followed all instructions included to build and compile, but i get this error. These SDK uses libusb library and some usb rules, both are perfectly installed and allowed. Hope get some help.

这是完整的软件包,您可以在其中找到所有代码和自述文件.

this is the complete pack where you can find all codes and readmes.

Dowload code!

In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
             from /usr/include/stdlib.h:42,
             from /usr/include/usb.h:15,
             from ../lnx/usbl.c:10:
../endian.h:44:10: error: #error Header <endian.h> should define macro __BYTE_ORDER.
     #error Header <endian.h> should define macro __BYTE_ORDER.
      ^
In file included from /usr/include/stdlib.h:42:0,
             from /usr/include/usb.h:15,
             from ../lnx/usbl.c:10:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:79:15: error: duplicate member ‘__w_retcode’


 unsigned int __w_retcode:8;
           ^
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:80:15: error: duplicate member ‘__w_coredump’


 unsigned int __w_coredump:1;
           ^
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:81:15: error: duplicate member ‘__w_termsig’


 unsigned int __w_termsig:7;
           ^
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:93:15: error: duplicate member ‘__w_stopsig’


 unsigned int __w_stopsig:8; /* Stopping signal.  */
           ^
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:94:15: error: duplicate member ‘__w_stopval’


 unsigned int __w_stopval:8; /* W_STOPPED if stopped.  */
               ^

推荐答案

stdlib.h包含您(或SDK的)源代码中的endian.h,而不是标准包含文件中的endian.h,因此__BYTE_ORDER永远不会定义.找到有冲突的endian.h文件并将其重命名.或者从您的工具链中删除-I编译标志.

The stdlib.h is including the endian.h from your (or the SDK's) source code instead of the one from the standard include files, thus __BYTE_ORDER is never defined. Find the conflicting endian.h file and rename it. Or remove -I compilation flag from your tool chain.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug = 598600

欢迎使用工具链配置.

这篇关于编译时出错,头文件endian.h上有重复成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆