编译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错误的更多相关文章

  1. conflicting types for xxxx错误 (转)

    pretty_print.c:31: error: conflicting types for ‘vmi_print_hex’ libvmi.h:749: note: previous declara ...

  2. 编译器出现conflicting types for 某某的错误原因总结

    直译就是xxxx 发生了一种冲突!比如今天发现的这个错误,实属低级! 本次错误的原因是:函数没有先声明,便写在了主函数后面!应该是先声明,后定义,如果只有定义,则定义必须写在主函数上方.通过查资料,有 ...

  3. conflicting types for ‘方法名’ 的错误

    将main()的实现写在drawShapes(),drawCircle(),drawRectangle()...之前. 结果编译的时候出现了  conflicting types for " ...

  4. /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 ...

  5. Xcode error: conflicting types for 'XXXX'

    问题描述:在main方法中调用了一个写在main方法后面的方法,比如: void main(){ A(); } void A(){} Xcode编译后就报错:conflicting types for ...

  6. 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_ ...

  7. warning: conflicting types for built-in function 'puts'

    warning: conflicting types for built-in function 'puts' [编译器版本] arm-linux-gcc 3.4.1 [问题描述] 在做嵌入式底层开发 ...

  8. mybatis报invalue types()错误

    错误信息: Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class cn.qd.mybat ...

  9. 模板不存在:./xx 错误位置 FILE: LINE:110 (thinkphp上传至服务器后模板无法解析原因)

    thinkphp上传至服务器后模板无法解析原因 前几日做好的响应式静态页面上传至虚拟空间,打开网址地址出现: 模板不存在:./App/Admin/View/Config/customerService ...

随机推荐

  1. jstl标签比较格式化后的时间

    c:set 里面不支持任何标签,这样写不好讲格式化的值放到bdateVar里面 <c:set var="bdateVar" value="<fmt:forma ...

  2. 函数 y=x^x的分析

    关于函数 y=xx的分析: 由图像得,y在负无穷大到0图像处处不连续,故y的定义域为(0,正无穷大): 故该函数不就是y=e^(lnxx)吗? 1.定义域:我们变形一下,y=e^(xlnx),显然是0 ...

  3. Angular 个人深究(三)【由Input&Output引起的】

    Angular 个人深究(三)[由Input&Output引起的] 注:最近项目在做别的事情,angular学习停滞了 1.Angular 中 @Input与@Output的使用 //test ...

  4. 011.Docker仓库管理

    一 Docker仓库介绍 docker 仓库,即 registry,实现了镜像的管理.分发,同时还包括用户的认证.docker registry 仓库是一个无状态的.高可靠的服务器应用程序,用来存储d ...

  5. babel和postcss引起的一点儿思考

    写es6,一般都会用到babel,它能把es6转为更好的es5,而es5可以直接在浏览器上运行.postcss是css界的babel,它可以把css转为更好的css,比如autoprefixer,让不 ...

  6. 查找最大或最小的 N 个元素

    使用内置的heapd模块 In [1]: import heapq In [2]: nums = [1,8, 2, 23, 7, -4, 18, 23, 42, 37, 2] In [3]: prin ...

  7. android studio 代码模板

    作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 313134555 @qq.com android studio 代码模板 an ...

  8. iptables转发端口

    1.本机端口转发 把发往本机80端口的数据重定向到8080端口 iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-por ...

  9. Python中的正则表达式探秘1

    正则表达式中的特殊字符: $ 匹配输入字符串的结尾位置.如果设置了 RegExp 对象的 Multiline 属性,则 $ 也匹配 '\n' 或 '\r'.要匹配 $ 字符本身,请使用 \$. ( ) ...

  10. java使用Base64编码

    import java.io.IOException;import java.io.UnsupportedEncodingException; import org.junit.Test; impor ...