mchen2
asked on
CView Inheritance
I am developing an application which has several views. All these views have some common attributes, so I need a class inherits from CView class and all the other views derived from this intermediate class. I put DECLARE_DYNCREATE(CMyView)
DECLARE_MESSAGE_MAP()
in the derived class. But there are some link problems: error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMyView::classCMyView" (?classCMyView@CMyView@@2U CRuntimeCl ass@@B).
Is it possible to have an intermediate class? How to do it?
DECLARE_MESSAGE_MAP()
in the derived class. But there are some link problems: error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMyView::classCMyView" (?classCMyView@CMyView@@2U
Is it possible to have an intermediate class? How to do it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thats strange ....
I usually get that error if I missed stdafx.h include in the .cpp
or sometimes a semicolon at the end of class definition.
In either case you should get the error message if definition and declaration are in same file.
Try stdafx and if it does not work include your code somehow (atleast all rel. pieces)
ASKER
I tried stdafx. I didn't work. And I have a semicolon at the end of class definition.
The error is at the end of the .cpp file:
fatal error C1010: unexpected end of file while looking for precompiled header directive
The error is at the end of the .cpp file:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Post your code
ASKER