I always use the VC platform to develop things, but sometimes this problem always occurs, here, I will extract some tips for using the Internet Lookup as follows. I hope it will be useful to you, saving you the trouble of searching again. 1. How to debug the project in the release status-> setting => projectsetting dialog box, select the release status. In the C/C ++ label, select general for category, disable (Debug) for optimizations, and program database for debut info. Select the Generate debug info check box in the Link label. Note: It is only an intermediate state between debug and release, and all assert and verify do not work. The function call method is actually called, rather than the table, however, in this status, the quickwatch and call queue tracking functions are still effective, just like the debug version. 2. What are the differences between release and debug? Release is called release and debug is called debug. Debug can be executed and tracked in one step, but the generated executable file is large, Code The running speed is slow. Release runs fast and has a small executable file, but cannot execute the debugging function under the compiling conditions. The release EXE file is linked to the Standard mfc dll (use MFC in a shared or static DLL ). These DLL have been configured during Windows installation, so these Program It can run on a machine without visual C ++ 6.0 installed. The debug version EXE is linked to the debug version of the mfc dll file and cannot be run on a machine without visual C ++ 6.0 installed, because the corresponding DLL is missing, unless you select use static DLL when link. 3. What is the difference between assert and verify? The content in assert is not compiled in the release version. The content in Verify is still translated, but it is no longer true or false. Therefore, the latter is safer. For example, assert (file. Open (strfilename )). Once in the release version, this line is ignored, and the file is not open () at all, and there is no error message. If verify () is used, this problem will not occur. 4. what is the relationship between the workspace and the project? Each workspace can contain several projects, but only one is in the active state, and each project can have a dependency between them. In the project's setting .. for example, the active project can depend on other static libraries that provide function calls. 5. How to Use classwizard in a non-MFC program to create an empty. RC file in the project directory and add it to the project. 6. How to set a breakpoint to press F9 to add a breakpoint at the current cursor and cancel a breakpoint. In addition, press Ctrl + B to bring up the breakpoint Settings dialog box. Then click [condition ...] Click the button to bring up a dialog box to set the breakpoint conditions. 7. in the editing status, it is found that the member variables or functions cannot be displayed. The prompt is how to enable the display function. This seems to be a bug in the current visual c ++ 6.0 version. You can follow the steps below to make it normal, if it appears again, it can be processed as follows: (1) Close project (2) Delete "project name. NCB file (3) re-open the Project 8. how to completely delete a class generated by classwizard first, select the class in the FileView of the workspace. H and. to delete the CPP file, press delete to delete it, delete the two files in the file manager, and then run classwizard. If you want to remove the files, select Remove. 9. how to find the class that disappears in the workspace, open the header file corresponding to the class, and change its class name as needed. A new class will appear in the workspace at this time, change this class to its original name. 10. How to clear all breakpoint menus [edit]-> [breakpoints ...], Open the breakpoints dialog box and click Remove all. (I personally use Ctrl + B to open this dialog box.) The shortcut key is "Ctrl + Shift + F8 ". 11. How to Select Unlisted Information in classwizard to open the "classwizard" dialog box and switch to the "class Info" page. Change "message filter". For example, if "window" is selected, window information will appear on the "message" page. 12. How to check whether the brackets in the program match and move the cursor to the front of the brackets to be checked, press the shortcut key "Ctrl +]". If the brackets match correctly, the cursor jumps to the matching brackets. Otherwise, the cursor does not move and the chassis horn generates a warning. 13. how to view the definition of a macro (or variable or function) and move the cursor to the macro to be viewed, for example, to press F12 (or right-click the related menu in the menu) on declare_map_message ), if a Browser file is not created, a dialog box is displayed. Click OK and the macro (or variable or function) is defined. 14. How to add the Lib file to the current project click Project> Settings ...] In the displayed "project setting" dialog box, switch to the "Link" tab, enter the Lib file name in "Object/library modules", and use a blank space for different lib files. 15. How to quickly delete the temporary files in the debug folder under a project select the corresponding project in the FileView view of the workspace, right-click the pop-up menu, and select the clean (selection only) menu. 16. how to quickly generate a new project with the same name as an existing project? In the new project dialog box, select Custom Appwizard and enter the name of the new project, click OK. The custom Appwizard item appears. enter the name of the new project and click OK. In the custom Appwizard-step 1 of 2 dialog box, select an existing project and click Next. The custom Appwizard-Step 2 of 2 dialog box appears. Select the project file name of the existing project and click Finish. After compilation, a project Appwizard that is the same as the existing project but can be renamed again is generated. Now you can use the customized Wizard like the MFC Appwizard. If you do not want to use it, you can delete the. awx and. PDB files corresponding to the wizard in the common \ msdev98 \ template directory under the Visual C ++ 6.0 installation directory. 17. How to Solve the Problem of incorrect connection to Visual C ++ 6.0: if a file is changed, the entire project must be re-compiled once. Just now the link is ready for operation, and the system prompts you to re-compile the link once. This is because of the future file (the modification time and creation time are later than the system time. You can do this: Find the DEBUG directory under the project folder, delete all files created and modified at a time later than the system time, and then rebuild all again. 18. common lnk2001 errors that cause lnk2001 are as follows: unresolved external symbol "symbol" this error message is generated if the linked program cannot find the referenced function, variable, or tag in all libraries and target files. Generally, there are two reasons for the error: one is that the referenced function or variable does not exist, the spelling is incorrect or the usage is incorrect; the other is that different versions of the Link Library may be used. The following are possible causes of lnk2001 errors: <1> lnk2001 errors due to encoding errors (1) mismatched program code or module definition (. Def) files cause lnk2001. For example, if a variable "var1" is declared in the C ++ source file, but the variable "var1" is attempted to access the change volume in another file. (2) If the inline function is defined in the. cpp file, rather than being defined in the header file, lnk2001 errors will occur. (3) When calling a function, if the parameter type used does not match the type declared in the header function, lnk2001 error will occur. (4) lnk2001 error will occur when you attempt to call a virtual function from the constructors or destructor of the base class. (5) Pay attention to the availability of functions and variables. Only global variables and functions are public. Static functions and static variables have the same scope of use. A compilation error or lnk2001 error occurs when you try to obtain any static variables not declared in the file from outside the file. <2> lnk2001 error caused by compilation and On-line configuration (1) if the/nod (/noderaultlib) option is used during compilation, the Runtime Library and MFC required by the program are written into the target file module by the compiler, but these libraries will not be linked to the project file unless they are explicitly included in the file. In this case, using/nod will cause lnk2001 errors (2) If no program entry is set for wwinmaincrtstartup, when Unicode and MFC are used, the "unresolved external on _ winmain @ 16" lnk2001 error message is displayed. (3) When compiling with the/MD option, since all the runtime libraries are kept in the dynamic link library, reference "_ imp _ FUNC" in the target file. If you try to use the static library libc. lib or libcmt. Lib for Link, lnk2001 error will occur on _ imp _ FUNC. If you do not use the/MD option for compilation, the lnk2001 error will also occur when you use the msvcxx. Lib link. (4) When compiling with the/ml option, if libcmt. Lib is used, the lnk2001 error will occur on _ errno. (5) When compiling and debugging an application, if you use the release modal library for link, the lnk2001 error will also occur. Similarly, the same error occurs when you use the debug modal library to link the release application. (6) mixed use of libraries and compilers of different versions can also cause problems, because the new library may contain symbols and descriptions not available in earlier versions. (7) using inner and non-inline compilation options in different modules can cause lnk2001 errors. If function inline (/ob1 or/ob2) is enabled when the C ++ library is created, but function inline (no inline keyword) is disabled in the header file that describes the function ), only the error message is returned. To avoid this problem, the inline keyword should be marked as an inline function in the corresponding header file. (8) Incorrect/subsystem or entry settings can also cause lnk2001 errors. 19. How to debug a DLL called by an EXE file without source code in Visual C ++ 6.0, go to the "Project setting" dialog box, and select the debug tab. Generally, Visual Studio uses "executable for debug session" by default as the executable file name, but you can change it to any program you want. You can even specify different working directories and PASS Parameters to your program. This technique is often used to debug DLLs, namespace extensions, COM objects, and other plug-in programs called from certain EXE and third-party exe. 20. What does the project file in Visual C ++ 6.0 indicate? OPT: The parameter file of the project about the development environment. Such as the tool bar position and other information .. APS (appstudio file) is a resource auxiliary file in binary format .. CLW: classwizard information file is actually in the INI file format. If you are interested, please study it. Sometimes the classwizard has a problem. You can manually modify the CLW file to solve the problem. If this file does not exist, you will be prompted whether to re-create it each time you use classwizard .. DSP (developstudio project): project file, text format, but do not modify it manually if you are not familiar with it .. DSW (developstudio workspace): It is a workspace file. Other features are similar to. DSP .. PLG: it is a compilation information file. The error and warning information files during compilation (actually an HTML file) are generally of little use. In the dialog box that appears, choose tool> Option to control file generation .. HPJ (Help Project): a project that generates a Help file. It can be processed by Microsoft Help compiler .. MDP (Microsoft devstudio project): an earlier version of the project file. To open this file, you will be prompted to convert it to a new. DSP format .. BSc: Used to browse project information. This file is required if source Brower is used. If you do not need this function, you can remove the generate browse info file in project options to speed up compilation .. Map is the image information record file of the execution file. Unless it is at the bottom of the system, this file is generally not needed .. PCH (pre-compiled file): it is used to compile files, which can speed up compilation, but the file size is very large .. PDB (Program database): Records Program-related data and debugging information, which may be useful during debugging .. Exp: it is generated only when the DLL is compiled. It records some information about the DLL file and is generally useless .. NCB: no compile browser ). You can delete this file when the Automatic completion function fails. The project is automatically generated after compilation.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.