0

I'm kinda new to programming in general, so please excuse me if it's something obvious. I tried searching but didn't find anything of help to me.

Now for the actual problem:
For a school-project we are supposed to create a project in mfc with multiple dialogs and since it's a group-project I would like to know how to add other projects to an existing one.

What I already did:

#include "2ndProjectDlg.h" //in 1stProjectDlg.h  
2ndProjectDlg second; //in 1stProjectDlg.h 

void C1stProjectDlg::OnBnClickedButton1() //in 1stProjectDlg.cpp
{
second.DoModal();
}   

The error message I got:

unresolved external symbol "public: __thiscall C2ndProjectDlg::C2ndProjectDlg(class CWnd *)" (??0C2ndProjectDlg@@QAE@PAVCWnd@@@Z) referenced in function "public: __thiscall C1stProjectDlg::C1stProjectDlg(class CWnd *)" (??0C1stProjectDlg@@QAE@PAVCWnd@@@Z)

Would really appreciate a step by step guide or some reference material.

  • 1
    You didn't include the code for the construcotr C2ndProjectDlg::C2ndProjectDlg. If you use the .h file. include the cpp file too. – xMRi Dec 21 '18 at 11:26
  • @xMRi after including the .cpp the lnk2019 error is gone, but now i got other errors: i.imgsafe.org/d1/d12cf77b4c.png – Kevin Maschke Dec 21 '18 at 16:42
  • You don't need a second project for adding a second dialog. Each Visual Studio project creates a separate application (or *.dll ...) School group projects, github projects, Visual Studio projects... are not the exact same thing. You might want to start with a console based hello world program to figure out the basics. Read the errors and warnings which are often self-explanatory. – Barmak Shemirani Dec 21 '18 at 17:16
  • 2
    Please learn basics. Use a forum to discuss basic things. Use stackoverflow when you have specific detailed problems. Stackoverflow isn't a site to learn programming or discuss such things. – xMRi Dec 21 '18 at 17:16

0 Answers0