conflicting types for xxxx错误 (转)
解决方案:
将libvmi/libvmi.h:void vmi_print_hex (unsigned char *data, unsigned long length);和
错误:
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 xxxx错误 (转)的更多相关文章
- conflicting types for xx错误
编译libvmi 0.8版本时,出现以下错误: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -fvisibility=hidden -I/ ...
- Xcode error: conflicting types for 'XXXX'
问题描述:在main方法中调用了一个写在main方法后面的方法,比如: void main(){ A(); } void A(){} Xcode编译后就报错:conflicting types for ...
- 编译器出现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 ...
- 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 ...
- 网页提示[Not allowed to load local resource: file://XXXX]错误
网页通过http 访问时, 点击打开文件的link.在Chrome 中会报 Not allowed to load local resource: file// XXXX 的错误 <!--Add ...
随机推荐
- 缺少对象 WScript 问题解决方法
方法一: 先把脚本保存起来(保证你的脚本能正确运行),例如命名为test.vbs 然后在QTP写以下脚本就可以正确运行了! Dim oShell Set oShell =CreateObject (& ...
- 邮件发布google blogger 博客
<?php $to = "@gmail.com";$subject = "Test mail";$message = "Hello! This ...
- eclipse中向左缩进快捷键
总是忘记,还是记下来吧,以后查找方便 Shift + Tab
- html 细线表格
可以<table width="800px" cellpadding="0" border="1px" style="bor ...
- regular expression tutorial
\d represent any number \D represents everything but a number \s represents any space \S Anything bu ...
- htop安装步骤【原创】
htop安装步骤 下载:http://hisham.hm/htop/releases/ [root@hchtest2 ~]# tar zxvf htop-2.0.2.tar.gz [root@hcht ...
- 经常出现null错误之tostring
如果需要转换的类型可能为null,如果使用tostring就可能引发错误,这时候可以使用convert.tostring方法.
- DataGirdView 编辑项时的验证
dgvConfig.DataSource = CreateTable(); dgvConfig.Columns["编号"].ReadOnly = true; //只读 dgvCon ...
- wl18xx module crash with "wlcore: ERROR ELP wakeup timeout!"
[ 111.322967] wlcore: ERROR ELP wakeup timeout![ 111.327636] ------------[ cut here ]------------[ 1 ...
- 删除cygwin
由于cygwin 学习了linux 的用户所有者的方式,要删除有一定困难. 所以要右击 然后点 获取管理员所有权 几分钟之后 就可以删了