title: warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
body: <p>I am receiving this warning many times for my project:</p>
  
  <pre><code>warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
  </code></pre>
  
  <p>I am compiling using Visual Studio 2010 Professional Edition, the 2010 version of the compiler, but VC++ <strong>2005</strong> libraries. </p>
  
  <p>This seems to be the cause. If I use the 2010 libraries, or the 2005 compiler, the problem disappears with no changes to the code. However, I want to use the 2005 libraries and 2010 compiler together if I possibly can. </p>
  
  <p>Does anybody know how to fix this, or whether these warnings are definitely safe to ignore/disable?</p>
  
  <p>Thank you.</p>
  
  <p>EDIT: The problem seems to be caused by a change in atlbase.h:</p>
  
  <p>2005:</p>
  
  <pre><code>#if defined(_M_IA64) || defined(_M_IX86) || defined (_M_AMD64)
  
  #pragma section("ATL$__a", read, shared)
  #pragma section("ATL$__z", read, shared)
  #pragma section("ATL$__m", read, shared)
  extern "C"
  {
  __declspec(selectany) __declspec(allocate("ATL$__a")) _ATL_OBJMAP_ENTRY* __pobjMapEntryFirst = NULL;
  __declspec(selectany) __declspec(allocate("ATL$__z")) _ATL_OBJMAP_ENTRY* __pobjMapEntryLast = NULL;
  }
  
  #if !defined(_M_IA64)
  #pragma comment(linker, "/merge:ATL=.rdata")
  #endif
  
  #else
  
  extern "C"
  {
  __declspec(selectany) _ATL_OBJMAP_ENTRY* __pobjMapEntryFirst = NULL;
  __declspec(selectany) _ATL_OBJMAP_ENTRY* __pobjMapEntryLast = NULL;
  }
  
  #endif  // defined(_M_IA64) || defined(_M_IX86)
  </code></pre>
  
  <p>2010:</p>
  
  <pre><code>#pragma section("ATL$__a", read)
  #pragma section("ATL$__z", read)
  #pragma section("ATL$__m", read)
  extern "C"
  {
  __declspec(selectany) __declspec(allocate("ATL$__a")) _ATL_OBJMAP_ENTRY* __pobjMapEntryFirst = NULL;
  __declspec(selectany) __declspec(allocate("ATL$__z")) _ATL_OBJMAP_ENTRY* __pobjMapEntryLast = NULL;
  }
  
  #if !defined(_M_IA64)
  #pragma comment(linker, "/merge:ATL=.rdata")
  #endif
  </code></pre>
  
  <p>But I don't see how to use this knowledge to fix my problem :(</p>