青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

[轉(zhuǎn)載]VC++常見(jiàn)錯(cuò)誤

Visual C++ Error Messages

This page contains a listing of "difficult to diagnose" error messages and possible fixes. I haven't taught a programming class that uses Visual C++ in several years so this list is probably out of date by now.  It was valid for Microsoft Visual C++ version 6.0 service pack 3.

 

C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information

This error results from leaving off the parentheses immediately following the function name in a function header.  To correct the error simply add () to the end of the function name.

 

C1010: unexpected end of file while looking for precompiled header directive

If your project is an MFC AppWizard created project then this error results from not #including StdAfx.h as the first include statement (before any other includes, data declarations, or executable program code).

 

C1083: Cannot open precompiled header file: 'Debug/<Project-Name>.pch': No such file or directory

This error results from a missing file - the compiled version of StdAfx.cpp. Visual C++ does a poor job of keeping track of this file and frequently "forgets" how to build it. This problem often occurs after restoring a saved workspace from diskette without the Debug directory. To fix the error select StdAfx.cpp from the workspace file list them choose Compile from the Build menu.  If that doesn't work the go to Project -> Settings, select the C/C++ tab, and click the radio button labeled Create Precompiled Headers.

 

C2001: newline in constant

This error is usually caused by a string or character constant that is missing its closing ' or " symbol.

C2065: '<data-member name>' : undeclared identifier

If this error occurs in one of your member functions then it is generally the result of forgetting the class scope operator in front of the function name in your .cpp file.

 

C2143: syntax error : missing ';' before 'PCH creation point'

Check each of the include files to ensure that the closing brace of each class declaration is followed by a semicolon.

 


C2143: syntax error : missing ';' before '*'

If this error is followed by two C2501 errors then the problem is an undeclared class name within a pointer declaration.

For example, the declaration:

CClass *pObject;

will generate the above error message followed by a C2501 error message for 'CClass' and another C2501 message for 'pObject'.  The problem is that the compiler isn't recognizing CClass as a valid class/type name.  To correct the problem add a i nclude of the file containing the declaration of CClass (e.g., i nclude CClass.h)

 

C2447: missing function header (old-style formal list?)

This error usually results from a missing { or use of a ; instead of a { following the parameter list of a function header.

 

C2511: '<function-name>' : overloaded member function not found in '<class-name>'

This error results from a mismatch in the parameter list of a member function declaration (.h file) and definition (.ccp file). Check the forward declaration of the function in the .h file and its definition in the .cpp file and ensure that the number of parameters and the type of each parameter match exactly.

C2512: '<constructor-function-name>' : no appropriate default constructor available

This error usually occurs when you implement the constructor function of a derived class and forget to include parameter passing to the base class constructor function.   For example assume that CDerived is derived from CBase and that the CBase constructor function requires one parameter (e.g., int A).  If you define the CDerived constructor function as:

CDerived::CDerived(int A, int B) { ... }

the compiler will issue the above error message on the line containing the function header of CDerived::CDerived() because you haven't provided instructions for routing the parameter A to CBase::CBase().  Because you didn't provide instructions the compiler assumes that CBase::CBase() requires no arguments and it complains because no version of CBase::CBase() has been defined that accepts zero arguments.

If you intended to provide a version of CBase::CBase() that requires no arguments then the error message indicates that you forgot to declare that function in your base class declaration (e.g., in CBase.h).

If CBase::CBase() does require one or more arguments then you must correct the problem by including explicit instructions for passing parameters from the derived class constructor function to the base class constructor function.  The correction for the example above is:

CDerived::CDerived(int A, int B) : CBase(A) { ... }

 

C2556: '<function-name>' : overloaded functions only differ by return type
C2371: '<function-name>' : redefinition; different basic types

These errors usually result from a mismatch of function type between a .h and .cpp file. Check the forward declaration of the function in the .h file and its definition in the .cpp file and make the function return type identical in both files.

 

C2601: '<function-name>' : local function definitions are illegal

This error results from defining one function inside the body of another function.   It usually means that you omitted one or more } symbols in the function just before the function named in the error message.

C2653: '<Class-Name>' : is not a class or namespace name

This error usually results from not having include "StdAfx.h" as the first include statement in your class.cpp file.  It can also occur if your class definition is in a .h file and you forget to include that .h file in another file that refers to the class name.

 

C2661: '<Class-Name>::<Function-Name>' : no overloaded function takes n parameters

This error indicates a mismatch between the parameters used in a function call (e.g., from main.cpp) and the declaration of the function.  The function call is passing n parameters and there is no function declaration that uses that number of parameters.

 

LNK1104: Cannot open file nafxcwd.lib

This error sometimes occurs when a project uses a class from the MFC but the project settings don't explicitly tell the link editor to look in the MFC libraries. 

Go to Project --> Settings (Build --> Settings in Visual C++ 4.0). On the General tab check the box that says "Use MFC in a Shared DLL".

 

LNK1168: cannot open Debug\<Project-Name>.exe for writing

This error occurs when the link editor attempts to write to a .exe file that is currently in use. The .exe file of an executing program is write protected until the program is terminated. Look at the status bar at the bottom of your screen and find the icon representing your executable application. Open the application and exit from it. Then select Build.

 

LNK2001: unresolved external symbol __endthreadex
LNK2001: unresolved external symbol __beginthreadex

These errors result from using an MFC object or function without telling the link editor to search the MFC libraries.

Go to Project --> Settings (Build --> Settings in Visual C++ 4.0). On the General tab check the box that says "Use MFC in a Shared DLL".

LNK2001: unresolved external symbol _main

Your project doesn't contain a function called main().  The error usually results from forgeting to add main.cpp to the project workspace.

 

<File>.obj : error LNK2001: unresolved external symbol "public: void __thiscall <Class1>::<Function1>(<Type>)"

This a generic form of a LNK2001 error where <File>.obj can be any object file in your project and <Class1>::<Function1>(<Type>) can be any function in any class.  Substitute the specific <File>, <Class>, <Function>, and <Type> in your message into the instructions below to diagnose and correct the problem.

An LNK2001 error means that the link editor is looking for a compiled function and can't find it.  The call to the "missing function" is somewhere in <File>.cpp. Unfortunately, double-clicking on the error message won't take you to the point in <File.cpp> where the function is called but you can search for it with Find or Find In Files.  The function the link editor can't find is a member of <Class>, its name is <Function1>, and its return type is <Type>.

There are two common reasons for a LNK2001 error:

1.        The call in <File>.cpp doesn't match the function prototype in <Class>.h and/or the implementation in <Class>.cpp.  The mismatch may be in the function name, return type, or number and/or type of parameters.   Correction strategies include:

o        Check that the function name is spelled the same (case sensitive) in all three files (File.cpp, Class.h, and Class.cpp).

o        Check that the function is actually declared and defined within <Class> - perhaps you defined it as a member of a different class or perhaps you tried to call the function (in <File>.cpp) using an object or object pointer of a different class.

o        Check that the number and type of parameters in the function implementation (in <Class>.cpp) matches the number and type of parameters declared in the function declaration in <Class>.h.

o        Check that the number and type of parameters in the function call (in <File>.cpp) matches the number and type of parameters declared in the function header in <Class>.cpp.

2.        The function was never declared or was declared but never defined.  To see if either is the case go to the ClassView window of the Workspace view.  Click the + next to <Class> and find <Function> in the list of member functions.

o        If <Function> is NOT in the list then it was never declared or defined - add a declaration to the class declaraion in <Class>.h and implement the function in <Class>.cpp.

If <Function> is in the list then right click on it and select Go To Definition from the pop-up menu.  If you get the error message Cannot find definition (implementation) of this function then the function was declared but never defined (implemented).  Implement the function to

o        <Class>.cpp.

 

LNK2005: <some-long-string-of-mostly-garbage> already defined in <name>.lib(<name>.obj)

This error usually results from including a source code file multiple times. If you recognize any of the names in the message then it probably results from multiple inclusion of one of your own header files. Check to be sure that you've used #ifndef/#define/#endif properly your header files. If you don't recognize the name then it's probably multiple inclusion of a system file (e.g., afxwin.h). Make sure that you haven't explicitly included something in main.cpp that is already included in one of your own header files.   Also check that you haven't included a .cpp file where you should have included a .h file

posted on 2007-04-15 21:24 ashura 閱讀(2322) 評(píng)論(0)  編輯 收藏 引用 所屬分類: Computer Science

<2025年12月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

導(dǎo)航

統(tǒng)計(jì)

常用鏈接

留言簿(2)

隨筆分類

隨筆檔案

文章分類

文章檔案

搜索

最新評(píng)論

閱讀排行榜

評(píng)論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美jizz19性欧美| 欧美激情一区二区| 一本色道久久加勒比88综合| 亚洲尤物视频在线| aaa亚洲精品一二三区| 欧美在线视频一区二区| 亚洲一级影院| 免费一级欧美在线大片| 久久久久九九视频| 国产精品免费视频xxxx| 日韩亚洲欧美一区| 亚洲乱码国产乱码精品精天堂 | 欧美在线不卡视频| 欧美日韩大片一区二区三区| 免费一级欧美在线大片| 国内偷自视频区视频综合| 亚洲一区二区av电影| 日韩午夜免费| 蜜桃久久精品乱码一区二区| 免费日韩av电影| 韩国女主播一区| 欧美在线视频全部完| 久久国产精品久久久久久电车| 国产精品二区三区四区| 一区二区三区日韩在线观看| 国产精品99久久久久久白浆小说| 欧美精品乱码久久久久久按摩 | 久久伊人免费视频| 国内自拍视频一区二区三区 | 亚洲人成久久| 亚洲精品在线一区二区| 欧美精品成人91久久久久久久| 亚洲国产毛片完整版| 亚洲精品国精品久久99热一| 欧美电影在线免费观看网站| 亚洲高清视频在线| 99视频在线观看一区三区| 欧美精品久久久久久久免费观看 | 亚洲女性裸体视频| 国产精品天美传媒入口| 亚洲欧美一区二区精品久久久| 欧美在线视频播放| 伊人久久大香线蕉综合热线| 久久一区二区三区超碰国产精品| 欧美激情精品久久久久久变态| 亚洲日本在线观看| 国产精品高潮视频| 久久精品视频在线观看| 欧美激情第一页xxx| 一区二区冒白浆视频| 国产精品成人av性教育| 欧美一级午夜免费电影| 欧美99在线视频观看| 一卡二卡3卡四卡高清精品视频 | 国产精品日韩欧美大师| 欧美一区二区三区四区视频| 亚洲大片免费看| 亚洲综合电影一区二区三区| 国产丝袜一区二区| 欧美成年人在线观看| 亚洲亚洲精品在线观看| 老司机午夜免费精品视频 | 亚洲欧美网站| 国产精品美女久久久久久免费| 日韩一区二区精品在线观看| 亚洲综合精品自拍| 欧美成年人视频网站| 麻豆久久婷婷| 蜜乳av另类精品一区二区| 久久婷婷国产麻豆91天堂| 欧美一激情一区二区三区| 性欧美精品高清| 欧美在线不卡| 久久久www成人免费精品| 久久精品欧美日韩| 久久乐国产精品| 老司机午夜免费精品视频| 免费在线看一区| 欧美阿v一级看视频| 欧美人与禽性xxxxx杂性| 欧美日韩国产一区精品一区 | 亚洲激情啪啪| 亚洲国产成人精品女人久久久 | av不卡免费看| 亚洲性视频网址| 午夜精品免费在线| 久久福利电影| 嫩草影视亚洲| 亚洲第一网站| 一本久道久久综合狠狠爱| 一本色道久久综合亚洲二区三区| 一区二区三区精品在线 | 欧美日韩三区四区| 国产精品黄色在线观看| 国产日韩一区| 亚洲激情社区| 亚洲欧美99| 久久频这里精品99香蕉| 亚洲高清不卡av| 亚洲午夜激情免费视频| 久久成人综合视频| 欧美精品激情在线| 国产精品网曝门| 尤物yw午夜国产精品视频| 一本久久知道综合久久| 欧美在线一区二区| 亚洲电影自拍| 亚洲欧美日韩精品综合在线观看| 久久蜜臀精品av| 欧美日韩综合精品| 一区二区亚洲欧洲国产日韩| 亚洲欧洲日韩在线| 欧美一区91| 欧美激情第六页| 亚洲免费在线看| 免费不卡亚洲欧美| 国产精品自在线| 亚洲人成毛片在线播放| 欧美在线视频观看| 欧美激情影院| 亚洲欧美日韩国产综合| 免费毛片一区二区三区久久久| 欧美午夜美女看片| 亚洲国产精品v| 欧美一区二区三区在| 亚洲国产免费看| 久久精品国产亚洲aⅴ| 欧美日韩日本视频| 亚洲国产一区二区三区高清| 欧美在线地址| 一区二区欧美亚洲| 欧美搞黄网站| 黄色成人免费观看| 性久久久久久| 夜夜嗨av一区二区三区| 欧美电影资源| 尤物九九久久国产精品的特点| 亚洲一区一卡| 亚洲人成小说网站色在线| 久久精品夜色噜噜亚洲a∨| 国产精品海角社区在线观看| 亚洲美女免费精品视频在线观看| 久久久久国产精品麻豆ai换脸| 一区二区三区日韩| 欧美高清在线精品一区| 在线播放中文一区| 久久久天天操| 亚洲欧美激情四射在线日| 欧美天天在线| 一区二区三区偷拍| 亚洲清纯自拍| 欧美精品大片| 亚洲精品裸体| 欧美激情一区二区三区全黄| 久久久欧美精品sm网站| 国产亚洲精品久久久| 性久久久久久| 午夜影院日韩| 国产欧美精品日韩区二区麻豆天美 | 中文一区二区在线观看| 亚洲电影毛片| 欧美成人免费网站| 亚洲人成人99网站| 亚洲国产精品专区久久| 欧美激情一区在线观看| 夜夜嗨网站十八久久| 亚洲精品国精品久久99热一| 欧美激情视频给我| 一本色道精品久久一区二区三区| 亚洲精品欧美专区| 欧美视频福利| 亚洲欧美国内爽妇网| 亚洲免费中文| 国产中文一区二区| 久久综合中文字幕| 猛男gaygay欧美视频| 最新国产精品拍自在线播放| 亚洲国产成人久久综合| 欧美日韩国产专区| 亚洲免费在线看| 性做久久久久久久免费看| 国产一区二区三区在线观看网站| 蜜臀av性久久久久蜜臀aⅴ| 免费在线一区二区| 这里只有精品视频| 香蕉久久国产| 亚洲高清资源综合久久精品| 亚洲激情视频网| 国产精品99一区二区| 久久精品中文字幕一区二区三区| 久久精品成人| 亚洲麻豆一区| 亚洲午夜一区二区三区| 一色屋精品视频免费看| 亚洲高清自拍| 国产精品久久久久久户外露出| 久久精品日韩一区二区三区| 免费国产一区二区| 亚洲免费中文| 久久深夜福利|