Thread: Linker Errors

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    31

    Linker Errors

    I have a dll I’m trying to add functionality to, this file already opens a dialog window. I want to call another dialog. I want to call another dialog in the constructor of this one, which I would think nominally is really easy.

    resource editor>add resource>new dialog
    then I added the buttons and edit boxes I wanted. Then right clicked on the dialog in the resource editor and added a class for it. So far to this point everything built fine.

    Now:

    Linking...
    .obj : error LNK2005: "public: static struct CRuntimeClass * __stdcall CSGOptionsBlackBoxClientDlg::GetThisClass(void)" (?GetThisClass@CSGOptionsBlackBoxClientDlg@@SGPAUC RuntimeClass@@XZ) already defined in TraderDialog.obj
    SGOptionsBlackBoxClientDlg.obj : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CSGOptionsBlackBoxClientDlg::GetRuntimeClass(void) const " (?GetRuntimeClass@CSGOptionsBlackBoxClientDlg@@UBE PAUCRuntimeClass@@XZ) already defined in TraderDialog.obj
    SGOptionsBlackBoxClientDlg.obj : error LNK2005: "public: __thiscall CSGOptionsBlackBoxClientDlg::CSGOptionsBlackBoxCli entDlg(class CWnd *)" (??0CSGOptionsBlackBoxClientDlg@@QAE@PAVCWnd@@@Z) already defined in TraderDialog.obj
    SGOptionsBlackBoxClientDlg.obj : error LNK2005: "public: virtual __thiscall CSGOptionsBlackBoxClientDlg::~CSGOptionsBlackBoxCl ientDlg(void)" (??1CSGOptionsBlackBoxClientDlg@@UAE@XZ) already defined in TraderDialog.obj
    SGOptionsBlackBoxClientDlg.obj : error LNK2005: "protected: static struct AFX_MSGMAP const * __stdcall CSGOptionsBlackBoxClientDlg::GetThisMessageMap(voi d)" (?GetThisMessageMap@CSGOptionsBlackBoxClientDlg@@K GPBUAFX_MSGMAP@@XZ) already defined in TraderDialog.obj
    SGOptionsBlackBoxClientDlg.obj : error LNK2005: "protected: virtual struct AFX_MSGMAP const * __thiscall CSGOptionsBlackBoxClientDlg::GetMessageMap(void)co nst " (?GetMessageMap@CSGOptionsBlackBoxClientDlg@@MBEPB UAFX_MSGMAP@@XZ) already defined in TraderDialog.obj
    SGOptionsBlackBoxClientDlg.obj : error LNK2005: "protected: virtual void __thiscall CSGOptionsBlackBoxClientDlg:oDataExchange(class CDataExchange *)" (?DoDataExchange@CSGOptionsBlackBoxClientDlg@@MAEX PAVCDataExchange@@@Z) already defined in TraderDialog.obj
    .\NYSPeg.def(4) : warning LNK4017: DESCRIPTION statement not supported for the target platform; ignored
    SGOptionsBlackBoxClientDlg.obj : warning LNK4006: "public: static struct CRuntimeClass * __stdcall CSGOptionsBlackBoxClientDlg::GetThisClass(void)" (?GetThisClass@CSGOptionsBlackBoxClientDlg@@SGPAUC RuntimeClass@@XZ) already defined in TraderDialog.obj; second definition ignored
    SGOptionsBlackBoxClientDlg.obj : warning LNK4006: "public: virtual struct CRuntimeClass * __thiscall CSGOptionsBlackBoxClientDlg::GetRuntimeClass(void) const " (?GetRuntimeClass@CSGOptionsBlackBoxClientDlg@@UBE PAUCRuntimeClass@@XZ) already defined in TraderDialog.obj; second definition ignored
    SGOptionsBlackBoxClientDlg.obj : warning LNK4006: "public: __thiscall CSGOptionsBlackBoxClientDlg::CSGOptionsBlackBoxCli entDlg(class CWnd *)" (??0CSGOptionsBlackBoxClientDlg@@QAE@PAVCWnd@@@Z) already defined in TraderDialog.obj; second definition ignored
    SGOptionsBlackBoxClientDlg.obj : warning LNK4006: "public: virtual __thiscall CSGOptionsBlackBoxClientDlg::~CSGOptionsBlackBoxCl ientDlg(void)" (??1CSGOptionsBlackBoxClientDlg@@UAE@XZ) already defined in TraderDialog.obj; second definition ignored
    SGOptionsBlackBoxClientDlg.obj : warning LNK4006: "protected: static struct AFX_MSGMAP const * __stdcall CSGOptionsBlackBoxClientDlg::GetThisMessageMap(voi d)" (?GetThisMessageMap@CSGOptionsBlackBoxClientDlg@@K GPBUAFX_MSGMAP@@XZ) already defined in TraderDialog.obj; second definition ignored
    SGOptionsBlackBoxClientDlg.obj : warning LNK4006: "protected: virtual struct AFX_MSGMAP const * __thiscall CSGOptionsBlackBoxClientDlg::GetMessageMap(void)co nst " (?GetMessageMap@CSGOptionsBlackBoxClientDlg@@MBEPB UAFX_MSGMAP@@XZ) already defined in TraderDialog.obj; second definition ignored
    SGOptionsBlackBoxClientDlg.obj : warning LNK4006: "protected: virtual void __thiscall CSGOptionsBlackBoxClientDlg:oDataExchange(class CDataExchange *)" (?DoDataExchange@CSGOptionsBlackBoxClientDlg@@MAEX PAVCDataExchange@@@Z) already defined in TraderDialog.obj; second definition ignored

    Any idea what this means…. It seems to be the same thing over and over.

  2. #2
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    check that the IDD_ for the two classes is different. Check any similarities between the classes that might confuse the compiler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linker errors
    By jw232 in forum C++ Programming
    Replies: 3
    Last Post: 06-12-2009, 12:56 PM
  2. Linker errors in VC++ 2005
    By C+/- in forum C++ Programming
    Replies: 0
    Last Post: 05-18-2007, 07:42 AM
  3. Sneaky little linker errors...
    By Tozar in forum C++ Programming
    Replies: 8
    Last Post: 10-25-2006, 05:40 AM
  4. Linker errors when compiling
    By The Wazaa in forum C++ Programming
    Replies: 4
    Last Post: 10-07-2006, 12:55 PM
  5. Linker errors with Visual C++
    By codegirl in forum C++ Programming
    Replies: 4
    Last Post: 09-11-2003, 09:20 AM