Solve problems with adding files in VC

zhaozj2021-02-11  187

Solve problems with adding files in VC

First, add DibDoc class header files and application files to the current workspace A, using the Dibdoc class in the class A1 of A1, and the following error: ERRORC2501: 'cdibdoc': missing dec1-specifiers have made the following Processing, solving the problem: 1. Check that found in class A1, the header file contains #include "dibdoc.h" before #include "stdafx.h"; 2. Correct the above error, compile the following error: Errorc2065: 'WM_DOREALIZE': UndeclaredIdentifier is analyzed that the message cannot be identified, which cannot identify the command (ID number) and other similar errors because the "dibdoc.h" placement is incorrect, suggests: In various types of application files, The header file of this class contains the last in all containing commands. Second, after the compilation, the connection, execution, the following error appears: line ... Dibdoc.obj: error lnk2001: unresolved external symbol "struct hdib _ * _ stdcall readdib (Classc &)" (? Readdib @@ ygpauhdib _ @@ aavc @@@ @Z) dibdoc.obj: error LNK2001:? unresolved external symbol "int_stdcallSaveDIB (structHDIB _ *, classC &)" (SaveDIB @@ YGHPAUHDIB _ @@ AAVC @@@ Z) ./ Debug / diblook.exe: fatal error LNK1120: 2 unresolved Externals Error Executing Link.exe repeatedly found that a Dibdoc class with a related file My.cpp did not copy, join the project. This kind of connectivity errors will be found later because the relevant files are not caused in the current project directory. Third, solve the above problem, the program is executed correctly, but when the ClassWizard is added to the Dibdoc class, in the ClassName list box, you can't see the Dibdoc class, and the original classwizard cannot automatically manages the files added via "Addtoproject". Solution: Start the resource manager, delete the .clw file in the project directory, then start ClassWizard, rebuild the .clw file. You can also add the same effect by editing the original .clw file, add the Dibdoc class description according to the specified format. (Hubei Liu Junfa)

转载请注明原文地址:https://www.9cbs.com/read-4018.html

New Post(0)