conflicting types for xx错误
编译libvmi 0.8版本时,出现以下错误:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT libvmi_la-pretty_print.lo -MD -MP -MF .deps/libvmi_la-pretty_print.Tpo -c pretty_print.c -fPIC -DPIC -o .libs/libvmi_la-pretty_print.o
pretty_print.c:31: error: conflicting types for ‘vmi_print_hex’
libvmi.h:749: note: previous declaration of ‘vmi_print_hex’ was here
make[3]: *** [libvmi_la-pretty_print.lo] Fehler 1
make[3]: Leaving directory `/usr/local/src/libvmi-0.8/libvmi'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/usr/local/src/libvmi-0.8/libvmi'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/usr/local/src/libvmi-0.8'
make: *** [all] Fehler 2
解决方案:
将libvmi/libvmi.h:void vmi_print_hex (unsigned char *data, unsigned long length);和
libvmi/pretty_print.c:void vmi_print_hex (unsigned char *data, size_t length)
中的数据类型改为一致的即可。
见其论坛:https://groups.google.com/forum/?fromgroups#!topic/vmitools/w76m93KevFg
常见此类问题的原因如下(引)
错误:
test.c:22: error: conflicting types for 'urlencode'
test.c:18: error: previous implicit declaration of 'urlencode' was here
原因一:
原来是因为没有先做函数声明,而函数位于main()之后。
在main函数前声明了函数原型后,一切ok.
原因二:
头文件的被循环引用,在引用时考虑清楚包含顺序
原因三:
头文件声明和定义参数稍有不同
例:
头文件中声明 void Hanlder(const char * buf);
在定义时写作 void Hanlder(char * buf);
这是就会发生conflicting types for 错误问题
conflicting types for xx错误的更多相关文章
- conflicting types for xxxx错误 (转)
pretty_print.c:31: error: conflicting types for ‘vmi_print_hex’ libvmi.h:749: note: previous declara ...
- 编译器出现conflicting types for 某某的错误原因总结
直译就是xxxx 发生了一种冲突!比如今天发现的这个错误,实属低级! 本次错误的原因是:函数没有先声明,便写在了主函数后面!应该是先声明,后定义,如果只有定义,则定义必须写在主函数上方.通过查资料,有 ...
- conflicting types for ‘方法名’ 的错误
将main()的实现写在drawShapes(),drawCircle(),drawRectangle()...之前. 结果编译的时候出现了 conflicting types for " ...
- /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’
/usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’/usr/include/linux/types.h:13: erro ...
- Xcode error: conflicting types for 'XXXX'
问题描述:在main方法中调用了一个写在main方法后面的方法,比如: void main(){ A(); } void A(){} Xcode编译后就报错:conflicting types for ...
- openwrt编译e2fsprogs-1.43时报错misc/create_inode.c:399:18: error: conflicting types for 'copy_file_range'
1. 详细报错信息 misc/create_inode.c:399:18: error: conflicting types for 'copy_file_range' static errcode_ ...
- warning: conflicting types for built-in function 'puts'
warning: conflicting types for built-in function 'puts' [编译器版本] arm-linux-gcc 3.4.1 [问题描述] 在做嵌入式底层开发 ...
- mybatis报invalue types()错误
错误信息: Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class cn.qd.mybat ...
- 模板不存在:./xx 错误位置 FILE: LINE:110 (thinkphp上传至服务器后模板无法解析原因)
thinkphp上传至服务器后模板无法解析原因 前几日做好的响应式静态页面上传至虚拟空间,打开网址地址出现: 模板不存在:./App/Admin/View/Config/customerService ...
随机推荐
- HDU 2896 病毒侵袭【AC自动机】
<题目链接> Problem Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻....在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一 ...
- 20172302 《Java软件结构与数据结构》第六周学习总结
2018年学习总结博客总目录:第一周 第二周 第三周 第四周 第五周 第六周 教材学习内容总结 1.树的概述及基本概念 (1)树是一种非线性数据结构,其中的元素被组织成了一个层次结构. (2)树由一个 ...
- win10 设置
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha ============
- LOJ.6284.数列分块入门8(分块)
题目链接 \(Description\) 给出一个长为n的数列,以及n个操作,操作涉及区间询问等于一个数c的元素,并将这个区间的所有元素改为c. \(Solution\) 模拟一些数据可以发现,询问后 ...
- BZOJ.1497.[NOI2006]最大获利(最小割 最大权闭合子图Dinic)
题目链接 //裸最大权闭合子图... #include<cstdio> #include<cctype> #include<algorithm> #define g ...
- BZOJ3019 : [Balkan2012]handsome
首先预处理出$f[i][j][k]$表示长度为$i$的序列,第一个位置是$j$,最后一个位置是$k$时合法的方案数. 从后往前枚举LCP以及那个位置应该改成什么. 用线段树维护区间内最左最右的已经确定 ...
- Python 八大排序算法速度比较
这篇文章并不是介绍排序算法原理的,纯粹是想比较一下各种排序算法在真实场景下的运行速度. 算法由 Python 实现,用到了一些语法糖,可能会和其他语言有些区别,仅当参考就好. 测试的数据是自动生成的, ...
- phpmyadmin更改密码
- Asp.Net JsonResult重写
在Json序列化工具中,Newtonsoft.Json 的工具包相对比较好用. 对于循环引用.序列化格式.时间格式等都提供了可配置. 如果想重写Mvc 自带 JsonResult 返回结果,提供了2中 ...
- .Net Core DES加密解密
一.DES说明 1.加密的密钥必须是16位,因为是通过AES处理的Create,AES内置的位数为16位. 2.加密结果返回Base64字符格式 二.加密方法整理 //默认密钥向量 private s ...