您现在正在浏览:首页 > 职教文章 > 职教论文 > 最常见的20种VC编译错误信息

最常见的20种VC编译错误信息

日期: 2010/4/4 浏览: 218 来源: 学海网收集整理 作者: 佚名

1、fatalerrorC1010:unexpectedendoffilewhilelookingforprecompiledheaderdirective。寻找预编译头文件路径时遇到了不该遇到的文件尾。(一般是没有#include"stdafx.h")
   2、fatalerrorC1083:Cannotopenincludefile:’R…….h’:Nosuchfileordirectory
   不能打开包含文件“R…….h”:没有这样的文件或目录。
   3、errorC2011:’C……’:’class’typeredefinition
   类“C……”重定义。
   4、errorC2018:unknowncharacter’0xa3’
   不认识的字符’0xa3’。(一般是汉字或中文标点符号)
   5、errorC2057:expectedconstantexpression
   希望是常量表达式。(一般出现在switch语句的case分支中)
   6、errorC2065:’IDD_MYDIALOG’:undeclaredidentifier
   “IDD_MYDIALOG”:未声明过的标识符。
   7、errorC2082:redefinitionofformalparameter’bReset’
   函数参数“bReset”在函数体中重定义。
   8、errorC2143:syntaxerror:missing’:’before’{’
   句法错误:“{”前缺少“;”。
   9、errorC2146:syntaxerror:missing’;’beforeidentifier’dc’
   句法错误:在“dc”前丢了“;”。
   10、errorC2196:casevalue’69’alreadyused
   值69已经用过。(一般出现在switch语句的case分支中)
   11、errorC2509:’OnTimer’:memberfunctionnotdeclaredin’CHelloView’
   成员函数“OnTimer”没有在“CHelloView”中声明。
   12、errorC2511:’reset’:overloadedmemberfunction’void(int)’notfoundin’B’
   重载的函数“voidreset(int)”在类“B”中找不到。
   13 errorC2555:’B::f1’:overridingvirtualfunctiondiffersfrom’A::f1’onlybyreturntypeorcallingconvention
   类B对类A中同名函数f1的重载仅根据返回值或调用约定上的区别。
   14、errorC2660:’SetTimer’:functiondoesnottake2parameters
   “SetTimer”函数不传递2个参数。
   15、warningC4035:’f……’:noreturnvalue
   “f……”的return语句没有返回值。
   16、warningC4553:’==’:operatorhasnoeffect;didyouintend’=’?
   没有效果的运算符“==”;是否改为“=”?
   17、warningC4700:localvariable’bReset’usedwithouthavingbeeninitialized
   局部变量“bReset”没有初始化就使用。
   18、errorC4716:’CMyApp::InitInstance’:mustreturnavalue
   “CMyApp::InitInstance”函数必须返回一个值。
   19、LINK:fatalerrorLNK1168:cannotopenDebug/P1.exeforwriting
   连接错误:不能打开P1.exe文件,以改写内容。(一般是P1.Exe还在运行,未关闭)
   20、errorLNK2001:unresolvedexternalsymbol"public:virtual__thiscallC……::~C……(void)"
   连接时发现没有实现的外部符号(变量、函数等)。

返回顶部