I have a solution with two projects. In the first project, I have Frame and some controls, in the second - CForcesEditorDialog: CDialog. I want to compare them. But this error does not allow me to compile the project:
MainFrame.obj: error LNK2019: unresolved external character "public: __thiscall CForcesEditorDialog :: CForcesEditorDialog (class CWnd *, class MainFrame *)" (?? 0CForcesEditorDialog @@ QAE @PAVCWnd @@ PAVMainFrame @@@ Z) link : int __thiscall MainFrame :: OnCreate (struct tagCREATESTRUCTA *) "(? OnCreate @MainFrame @@ IAEHPAUtagCREATESTRUCTA @@@ Z)
class CForcesEditorDialog;
class MainFrame : public CFrameWnd
{
CForcesEditorDialog* forcesEditorDialog;
public:
MainFrame();
~MainFrame();
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
};
int MainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
forcesEditorDialog = new CForcesEditorDialog(this,this);
}
class CForcesEditorDialog : public CDialog
{
ForcesBar* m_forcesBar;
MainFrame* pMainFrame;
public:
CForcesEditorDialog(CWnd* _pParentWnd = NULL, MainFrame* _pMainFrame = NULL);
}
CForcesEditorDialog::CForcesEditorDialog(CWnd* _pParentWnd, MainFrame* _pMainFrame)
: CDialog(IDD_CUR_DIALOG, _pParentWnd),
p_expander (0),
p_selectedItem(0),
m_enabled (false)
{
m_forcesBar = new ForcesBar();
pMainFrame = _pMainFrame;
}
Perhaps I had a problem with enabling these projects. I have never had a solution with two projects. Do you have any ideas about this?