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 ...
随机推荐
- TypeReference -- 让Jackson Json在List/Map中识别自己的Object
private Map<String, Object> buildHeaders(Object params) { ObjectMapper objectMapper = JacksonH ...
- iOS 技术篇:渐变色的简单实现方式
实现效果 //渐变设置 UIView *view = [[UIView alloc] initWithFrame:CGRectMake(,, [UIScreen mainScreen].bounds. ...
- svn版本管理工具的使用
安装参考http://www.cnblogs.com/macula/archive/2012/02/12/2347637.html 主要的使用步骤如下: 建立版本管理库: svnadmin creat ...
- python-线程的暂停, 恢复, 退出
我们都知道python中可以是threading模块实现多线程, 但是模块并没有提供暂停, 恢复和停止线程的方法, 一旦线程对象调用start方法后, 只能等到对应的方法函数运行完毕. 也就是说一旦s ...
- unity3d 给游戏添加音源 Unity3d adds a sound source to the game
unity3d 给游戏添加音源 Unity3d adds a sound source to the game 作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:3131345 ...
- POJ.3145.Common Substrings(后缀数组 倍增 单调栈)
题目链接 \(Description\) 求两个字符串长度不小于k的公共子串对数. \(Solution\) 求出ht[]后先减去k,这样对于两个后缀A',B',它们之间的贡献为min{ht(A)}( ...
- iptables转发端口
1.本机端口转发 把发往本机80端口的数据重定向到8080端口 iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-por ...
- wamp memcache 的安装与扩展(Windows 64)
一.windows操作系统下的memcache安装 1.此处提供32位的安装包链接,如果需要64位的应该可惜查得到.将下载的压缩包解压到自己确定的安装目录,我的参考如下: 2.为了安装顺利,所以需要以 ...
- 潭州课堂25班:Ph201805201 爬虫高级 第五课 sclapy 框架 日志和 settings 配置 模拟登录(课堂笔记)
当要对一个页面进行多次请求时, 设 dont_filter = True 忽略去重 在 scrapy 框架中模拟登录 创建项目 创建运行文件 设请求头 # -*- coding: utf-8 ...
- 潭州课堂25班:Ph201805201 WEB 之 CSS 第二课 (课堂笔记)
CSS 的引入方法: 第一种 : <!--直接在标签仙设置--><p style="color: yellow">CSS的第一种引入方法</p> ...