PRB: Unable to Derive Classes from External Dependencies (167349)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q167349 SYMPTOMS
When you try to create a new class derived from a generic class using the
New Class Wizard, you might get the following error message:
The New Class Wizard could not find the appropriate header file(s) to
include for the base class(es) <base class name>. If you choose to
derive from the class(es) anyway, you may need to manually add the
appropriate header file(s) to <derived class file>.
CAUSE
The New Class Wizard can only derive from classes explicitly included in
the project. Classes that are only in the External Dependencies folder are
not considered part of the project. That is, if the base class' header
file, where the base class is declared, is not included in the project, the
wizard cannot add the header to the derived class' header file.
RESOLUTION
To resolve the problem, you can do one of the following:
- Close the message box and derive the class anyway. Add the base class
header file manually to the derived class' header file.
-or-
- Add the base class header file to the project. On the Project menu,
click Add To Project, and then select Files. Browse for the base class
header file, then click OK. After doing this, you should be able to
derive the class without any warning messages.
Once the new class has been derived, you may remove the base class file
from the project, and it will appear in the External Dependencies folder on
the next build.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbide kbprb KB167349 |
---|
|