http://blog.sina.com.cn/s/blog_5420e000010185o2.html

编译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 错误问题

分享:    

3

喜欢

转载于:https://www.cnblogs.com/zhugeruiyu/p/3615215.html

(转载)conflicting types for xx各种错误的总结相关推荐

  1. c语言conflicting types,gcc编译C程序出现”error conflicting types for function”编译错误的分析解决...

    今天使用gcc编译C语言程序时出现 "error conflicting types for function" 编译错误,这个错误的原因是什么?如何解决?以下看正文的讲解. 在使 ...

  2. conflicting types for xx错误

    编译libvmi 0.8版本时,出现以下错误: libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -fvisibility=hidden -I/ ...

  3. conflicting types for错误

    Text encoding linux文本以\n换行,window文本以\r\n换行 Linux到windows linux文件到windows中出现编译错误,不一定提示conflicting typ ...

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

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

  5. linux 内核编译错误 error: conflicting types for ‘syscall_trace_enter’

    编译内核出现如下错误: arch/x86/kernel/ptrace.c:1472:17: error: conflicting types for 'syscall_trace_enter'  In ...

  6. linux c 编译错误 conflicting types for ‘xxx’

    原因一: 原来是因为没有先做函数声明,而函数位于main()之后. 在main函数前声明了函数原型后,一切ok. 原因二: 头文件的被循环引用,在引用时考虑清楚包含顺序 原因三: 头文件声明和定义参数 ...

  7. linux c 编译错误 conflicting types for 的解决办法

    编译时错误提示: error: conflicting types for xxx error: previous implicit declaration of xxx was here 原因与解决 ...

  8. Xcode error: conflicting types for 'XXXX'

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

  9. error: conflicting types for xxx in c

    一.问题描述 #include <stdio.h>#define MAXLINE 1000/* maximum input line length */ int getline(char ...

最新文章

  1. Winform中使用EasyPlayer-RTSP-Win开源组件实现播放RTSP视频流
  2. 关于嵌入式系统内存地址空间的一些疑问(.text、.data、.bass、堆\栈空间)
  3. readfile读取串口数据_西门子PLC-1200-串口Modbus RTU通讯实例
  4. zend studio 9实用快捷键大全 分享ZEND STUDIO 9的常用快捷键,高亮显示相同变量。...
  5. 5.26在网上看到的方法,实现图形缩放、对齐、图形修改后进行dirty check。(未实验过)...
  6. MySQL 5.6 for Windows 解压缩版配置安装(转)
  7. 【备忘】船舶的几个吨位概念
  8. python gif图 ctf_从两道CTF实例看python格式化字符串漏洞
  9. ProceXP超级进程查看管理工具
  10. wps怎么在中文后面加数字_wps带圆圈数字序号⑩后面怎么输入
  11. Ogre 天龙八部地形管理器
  12. 《Context and Attribute Grounded Dense Captioning》笔记
  13. EXCEL常见函数之逻辑函数
  14. 微信已经成为电商最重要的一个通道
  15. nagios-邮件报警
  16. 刚刚创建了《QQ飞车》新角色,来玩玩吧!
  17. 如何教书?谈谈我当助教的感想-顺便回忆一下大学
  18. Java学籍管理系统
  19. 单片机:数字式时钟—日历
  20. 华为鸿蒙国人希望,华为鸿蒙系统,将给国人生活带来巨大改变

热门文章

  1. Django form表单
  2. 高斯消元整数版和浮点数版实现
  3. Linux更换python版本 (转载)
  4. leetcode之Divide Two Integers
  5. AndroidStudio自动补完包的快捷键
  6. 深入解读ADO.NET2.0的十大最新特性
  7. 多线程(一、线程安全案例)
  8. 【微信小程序canvas】实现小程序手写板用户签名(附代码)
  9. 在 Windows 内核上运行 Docker 靠谱吗?专家六问六答帮你解惑!
  10. Pig的安装和简单使用