conflictingtypesforxx错误 for all skin types

conflictingtypesforxx错误 for all skin types

编译libvmi0.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 -MTlibvmi_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.opretty_print.c:31: error: conflicting types for‘vmi_print_hex’libvmi.h:749:note: previous declaration of ‘vmi_print_hex’ was heremake[3]: ***[libvmi_la-pretty_print.lo] Fehler 1make[3]: Leaving directory`/usr/local/src/libvmi-0.8/libvmi'make[2]: *** [all-recursive]Fehler 1make[2]: Leaving directory`/usr/local/src/libvmi-0.8/libvmi'make[1]: *** [all-recursive]Fehler 1make[1]: Leaving directory`/usr/local/src/libvmi-0.8'make: *** [all] Fehler2

解决方案:

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_tlength)中的数据类型改为一致的即可。见其论坛:https://groups.google.com/forum/?fromgroups#!topic/vmitools/w76m93KevFg常见此类问题的原因如下(引)

错误:
test.c:22: error: conflictingtypes for 'urlencode'
test.c:18: error: previous implicit declaration of 'urlencode' washere

原因一:
原来是因为没有先做函数声明,而函数位于main()之后。
在main函数前声明了函数原型后,一切ok.

原因二:

头文件的被循环引用,在引用时考虑清楚包含顺序

原因三:

头文件声明和定义参数稍有不同

例:

头文件中声明 voidHanlder(constchar * buf);

在定义时写作 voidHanlder(char *buf);

这是就会发生conflictingtypes for 错误问题

  

爱华网本文地址 » http://www.aihuau.com/a/25101018/372627.html

更多阅读

2013年英语中考复习任务型阅读专项练习

(1)Reading is a very good hobby for all the students. You can know much about the world ①_____ the help of all kinds of books. I’m sure everyone has a favorite subject. For example, some are interested in animals,

Web开发中最致命的8个小错误 – 码农网 java码农网

本文是码农网原创翻译,转载请看清文末的转载要求,谢谢合作!现在,有越来越多所谓的“教程”来帮助我们提高网站的易用性。本文收集了一些在Web开发中容易出错和被忽略的小问题,并且提供了参考的解决方案,以便于帮助Web开发者更好的完善网站

英雄无敌3地图名字英汉对照 英雄无敌3中英文对照

快过年了,大家休息的时间多了,玩游戏的时间也多了,但一玩英雄无敌3时想找一个地图进行游戏很不容易,下面我把这些地图的名字的英汉对照发过来,以便大家以后游戏。A Viking We Shall Go 维京风暴!A Warm and Familiar Place 竞争上岗Adven

声明:《conflictingtypesforxx错误 for all skin types》为网友从新开始分享!如侵犯到您的合法权益请联系我们删除