Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. What does this error mean?

What does this error mean?

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasehelpquestiondiscussion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    monsieur_jj
    wrote on last edited by
    #1

    Hi all What does this error mean:

    1>nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in UpdatePanel.obj
    1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
    1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
    1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmtd.lib(newaop.obj)
    1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMTD.lib(delete2.obj)

    This happens here:

    #include <afxdb.h> // MFC database classes

    #include <winsock2.h>

    #include <tchar.h>

    #ifndef _AFX_NO_AFXCMN_SUPPORT
    #include <afxcmn.h> // MFC support for Windows Common Controls
    #endif // _AFX_NO_AFXCMN_SUPPORT

    //#include "stdafx.h"
    #include "..\\Common\\smtpconnection2.h"
    BOOL CSMTPConnection2::Connect(LPCTSTR lpszHostDomain,
    DWORD dwTimeout /*= 10000*/) throw()
    {
    CSimpleArray<CAtlString> arrSMTP;
    _GetSMTPList(lpszHostDomain, arrSMTP);
    for(int i=0; i<arrSMTP.GetSize(); i++)
    {
    if(CSMTPConnection::Connect(arrSMTP[i], dwTimeout) == TRUE)
    return TRUE;
    }
    return FALSE;
    }

    void CSMTPConnection2::_GetSMTPList(LPCTSTR lpszHostDomain,
    CSimpleArray<CAtlString>& arrSMTP)
    {
    PDNS_RECORD pRec = NULL;
    if(DnsQuery(lpszHostDomain, DNS_TYPE_MX, DNS_QUERY_STANDARD,
    NULL, &pRec, NULL) == ERROR_SUCCESS)
    {
    PDNS_RECORD pRecOrig = pRec;
    while(pRec)
    {
    if(pRec->wType == DNS_TYPE_MX)
    arrSMTP.Add(pRec->Data.MX.pNameExchange);
    pRec = pRec->pNext;
    }
    DnsRecordListFree(pRecOrig,DnsFreeRecordList);
    }
    }

    What do you think? Thanks, Jayjay

    _ 1 Reply Last reply
    0
    • M monsieur_jj

      Hi all What does this error mean:

      1>nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in UpdatePanel.obj
      1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
      1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
      1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmtd.lib(newaop.obj)
      1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMTD.lib(delete2.obj)

      This happens here:

      #include <afxdb.h> // MFC database classes

      #include <winsock2.h>

      #include <tchar.h>

      #ifndef _AFX_NO_AFXCMN_SUPPORT
      #include <afxcmn.h> // MFC support for Windows Common Controls
      #endif // _AFX_NO_AFXCMN_SUPPORT

      //#include "stdafx.h"
      #include "..\\Common\\smtpconnection2.h"
      BOOL CSMTPConnection2::Connect(LPCTSTR lpszHostDomain,
      DWORD dwTimeout /*= 10000*/) throw()
      {
      CSimpleArray<CAtlString> arrSMTP;
      _GetSMTPList(lpszHostDomain, arrSMTP);
      for(int i=0; i<arrSMTP.GetSize(); i++)
      {
      if(CSMTPConnection::Connect(arrSMTP[i], dwTimeout) == TRUE)
      return TRUE;
      }
      return FALSE;
      }

      void CSMTPConnection2::_GetSMTPList(LPCTSTR lpszHostDomain,
      CSimpleArray<CAtlString>& arrSMTP)
      {
      PDNS_RECORD pRec = NULL;
      if(DnsQuery(lpszHostDomain, DNS_TYPE_MX, DNS_QUERY_STANDARD,
      NULL, &pRec, NULL) == ERROR_SUCCESS)
      {
      PDNS_RECORD pRecOrig = pRec;
      while(pRec)
      {
      if(pRec->wType == DNS_TYPE_MX)
      arrSMTP.Add(pRec->Data.MX.pNameExchange);
      pRec = pRec->pNext;
      }
      DnsRecordListFree(pRecOrig,DnsFreeRecordList);
      }
      }

      What do you think? Thanks, Jayjay

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      See here[^]

      You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups