I'm getting these linker errors and I've been trying for a while now to fix them to no avail. Any help would be greatly appreciated.
/out:LocalizeRC.exe
LocalizeRC.obj
LocalizeRC.obj : error LNK2001: unresolved external symbol "public: __thiscall CLocalizeRCDlg::CLocalizeRCDlg(class CWnd *)" (??0CLocalizeRCDlg@@$$FQAE@PAVCWnd@@@Z)
libcmt.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
LocalizeRC.exe : fatal error LNK1120: 2 unresolved externals
My declaration is in a .h file as follows:
Code:// CLocalizeRCDlg dialog class CLocalizeRCDlg : public CDialog { // Construction public: CLocalizeRCDlg(CWnd* pParent = NULL) //standard constructor
and the definition is in my .cpp file:
Code:// CLocalizeRCDlg dialog CLocalizeRCDlg::CLocalizeRCDlg(CWnd* pParent /*=NULL*/): CDialog(CLocalizeRCDlg::IDD, pParent) , m_bCopy(FALSE) , m_nObsoleteItems(0) , m_strWorkspace(_T("")) , m_strEdit(_T("")) , m_strTextmode(_T("")) , m_bNoSort(FALSE) , m_strInputRC(_T("")) , m_strLangINI(_T("")) , m_strOutputRC(_T("")) , m_strAbout(_T("")) { // last used Workspace from registry m_strWorkspace = AfxGetApp()->GetProfileString( SEC_LASTPROJECT, ENT_WORKSPACE ); }
If i move the definition to the .h file as well then the error LNK2001 above is no longer a problem. However then the project can't link with other definitions and they come up as LNK2001 errors. I don't want to move all my definitions in the .cpp file to the .h file if possible.
As for the libcmt.lib(crt0.obj) : error LNK2019 ... I've no idea why that is coming up so any help with that would also be great.
Many thanks,
Stephanie



LinkBack URL
About LinkBacks


