error LNK2005: _DllMain@12 already defined

From: Gayathri (anonymous_at_discussions.microsoft.com)
Date: 02/27/04


Date: Fri, 27 Feb 2004 01:21:07 -0800

Hi,
  I have a MFC dll that has a method that takes CString as parameter. If i include that in a ATL dll and compile it , it give a compilation error saying "Undeclared Identified CString". So i included Afxwin.h in the StdAfx.h of the ATL dll and then included my header file. But now when i compile it . it throws a linker error
    error LNK2005: _DllMain@12 already defined

What is the problem. How to include a MFC dll inside a ATL dll . Can anybody help me???