title: LNK2005 - ATL base class symbols already defined - What is the root cause?
body: <p>I a noob to Visual C++, but have used C++ before. I've have spent days on this problem so any help really appreciated.</p>
  
  <p>I've inherited a significant VC6 code base that I'm trying to compile and link with a newer compiler. The underlying dll projects are compiling and linking and the exe project is compiling but not linking. I get errors that look like this ...</p>
  
  <pre><code>MyBaseLib.lib(MyBaseLib.dll) : error LNK2005: "public: __thiscall ATL::CWindowImplRoot&lt;class ATL::CWindow&gt;::CWindowImplRoot&lt;class ATL::CWindow&gt;(void)" (??0?$CWindowImplRoot@VCWindow@ATL@@@ATL@@QAE@XZ) already defined in ClassInMyExe.obj
  </code></pre>
  
  <p>I've noticed that there are classes in both the exe and the offending MyBaseLib.dll that use ATL, specifically inheriting from CDialogImpl&lt;..>. I've referenced similar questions but I don't see an answer - I don't think that it's as simple as a class definition mistakenly inserted into a header file. </p>
  
  <p>I get the same error in both a VS2010 and VS2005 environments. </p>