最常見的20種VC++編譯錯誤資訊集合
阿新 • • 發佈:2019-01-29
1、fatal error C1010: unexpected end of file while looking for precompiled header directive。
尋找預編譯標頭檔案路徑時遇到了不該遇到的檔案尾。(一般是沒有#include "stdafx.h")
2、fatal error C1083: Cannot open include file: 'R…….h': No such file or directory
不能開啟包含檔案“R…….h”:沒有這樣的檔案或目錄。
3、error C2011: 'C……': 'class' type redefinition
類“C……”重定義。
4、error C2018: unknown character '0xa3'
不認識的字元'0xa3'。(一般是漢字或中文標點符號)
5、error C2057: expected constant expression
希望是常量表達式。(一般出現在switch語句的case分支中)
6、error C2065: 'IDD_MYDIALOG' : undeclared identifier
“IDD_MYDIALOG”:未宣告過的識別符號。
7、error C2082: redefinition of formal parameter 'bReset'
函式引數“bReset”在函式體中重定義。
8、error C2143: syntax error: missing ':' before '{'
句法錯誤:“{”前缺少“;”。
9、error C2146: syntax error : missing ';' before identifier 'dc'
句法錯誤:在“dc”前丟了“;”。
10、error C2196: case value '69' already used
值69已經用過。(一般出現在switch語句的case分支中)
11、error C2509: 'OnTimer' : member function not declared in 'CHelloView'
成員函式“OnTimer”沒有在“CHelloView”中宣告。
12、error C2511: 'reset': overloaded member function 'void (int)' not found in 'B'
過載的函式“void reset(int)”在類“B”中找不到。
13、error C2555: 'B::f1': overriding virtual function differs from 'A::f1' only by return type or calling convention
類B對類A中同名函式f1的過載僅根據返回值或呼叫約定上的區別。
14、error C2660: 'SetTimer' : function does not take 2 parameters
“SetTimer”函式不傳遞2個引數。
15、warning C4035: 'f……': no return value
“f……”的return語句沒有返回值。
16、warning C4553: '= =' : operator has no effect; did you intend '='?
沒有效果的運算子“= =”;是否改為“=”?
17、warning C4700: local variable 'bReset' used without having been initialized
區域性變數“bReset”沒有初始化就使用。
18、error C4716: 'CMyApp::InitInstance' : must return a value
“CMyApp::InitInstance”函式必須返回一個值。
19、LINK : fatal error LNK1168: cannot open Debug/P1.exe for writing
連線錯誤:不能開啟P1.exe檔案,以改寫內容。(一般是P1.Exe還在執行,未關閉)
20、error LNK2001: unresolved external symbol "public: virtual _ _thiscall C……::~C……(void)"
連線時發現沒有實現的外部符號(變數、函式等)。
function call missing argument list 呼叫函式的時候沒有給引數。
member function definition looks like a ctor, but name does not match enclosing class 成員函式聲明瞭但沒有使用
unexpected end of file while looking for precompiled header directive 在尋找預編譯標頭檔案時檔案意外結束,編譯不正常終止可能造成這種情況
尋找預編譯標頭檔案路徑時遇到了不該遇到的檔案尾。(一般是沒有#include "stdafx.h")
2、fatal error C1083: Cannot open include file: 'R…….h': No such file or directory
不能開啟包含檔案“R…….h”:沒有這樣的檔案或目錄。
3、error C2011: 'C……': 'class' type redefinition
類“C……”重定義。
4、error C2018: unknown character '0xa3'
不認識的字元'0xa3'。(一般是漢字或中文標點符號)
5、error C2057: expected constant expression
希望是常量表達式。(一般出現在switch語句的case分支中)
6、error C2065: 'IDD_MYDIALOG' : undeclared identifier
“IDD_MYDIALOG”:未宣告過的識別符號。
7、error C2082: redefinition of formal parameter 'bReset'
函式引數“bReset”在函式體中重定義。
8、error C2143: syntax error: missing ':' before '{'
句法錯誤:“{”前缺少“;”。
9、error C2146: syntax error : missing ';' before identifier 'dc'
句法錯誤:在“dc”前丟了“;”。
10、error C2196: case value '69' already used
值69已經用過。(一般出現在switch語句的case分支中)
11、error C2509: 'OnTimer' : member function not declared in 'CHelloView'
成員函式“OnTimer”沒有在“CHelloView”中宣告。
12、error C2511: 'reset': overloaded member function 'void (int)' not found in 'B'
過載的函式“void reset(int)”在類“B”中找不到。
13、error C2555: 'B::f1': overriding virtual function differs from 'A::f1' only by return type or calling convention
類B對類A中同名函式f1的過載僅根據返回值或呼叫約定上的區別。
14、error C2660: 'SetTimer' : function does not take 2 parameters
“SetTimer”函式不傳遞2個引數。
15、warning C4035: 'f……': no return value
“f……”的return語句沒有返回值。
16、warning C4553: '= =' : operator has no effect; did you intend '='?
沒有效果的運算子“= =”;是否改為“=”?
17、warning C4700: local variable 'bReset' used without having been initialized
區域性變數“bReset”沒有初始化就使用。
18、error C4716: 'CMyApp::InitInstance' : must return a value
“CMyApp::InitInstance”函式必須返回一個值。
19、LINK : fatal error LNK1168: cannot open Debug/P1.exe for writing
連線錯誤:不能開啟P1.exe檔案,以改寫內容。(一般是P1.Exe還在執行,未關閉)
20、error LNK2001: unresolved external symbol "public: virtual _ _thiscall C……::~C……(void)"
連線時發現沒有實現的外部符號(變數、函式等)。
function call missing argument list 呼叫函式的時候沒有給引數。
member function definition looks like a ctor, but name does not match enclosing class 成員函式聲明瞭但沒有使用
unexpected end of file while looking for precompiled header directive 在尋找預編譯標頭檔案時檔案意外結束,編譯不正常終止可能造成這種情況