登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

仙剑奇侠传的博客

羽化成仙

 
 
 

日志

 
 

C语言常用错误列表  

2011-08-10 16:52:52|  分类: C |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

序号

错误原因

错误提示

 

把全局静态变量用成了extern

error: multiple storage classes in declaration specifiers

 

函数定义增加了register修饰饰符

error: function definition declared 'register'

 

auto const register int b;register与auto不能同时修饰一对象

error: multiple storage classes in declaration specifiers

 

意思语句前缺少= ,;、asm等。常用是忘记加";"

error: expected '=', ',', ';', 'asm' or '__attribute__' before 'p'

 

意思相关的函数只有定义没有申明

implicit declaration of function 'insertToPGLinked'

 

意思在浮点数之间不能进行异或操作

invalid operands to binary ^ (have 'float' and 'float')

 

意思是该文件不能引用到SWAP。SWAP或是函数或是宏,一般是程序源文件中找不到出处。

C:\Windows\TEMP\ccvzpbTt.o:defineDemo.c:(.text+0xa4): undefined reference to `SW

AP'

 

这种错误的引起一般是在源程序使用wchar_t 类型,需要给这种类型变量赋给中文值。需要告诉gcc源码就是中文,好让期转换成utf-8格式。

-finput-charset=GB18030 加在gcc指令中

error:converting to execution character set: Illegal byte sequence

  评论这张
 
阅读(5112)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018