title: Resources in static library question
body: <p><em>This isn't a duplicate of <a href="https://stackoverflow.com/questions/531502/vc-resources-in-a-static-library">VC++ resources in a static library</a> because it didn't help :)</em></p>
  <p>I have a static library with <em><strong>TWO</strong></em> <code>.rc</code> files in it's project. When I build my project using the <code>Debug</code> configuration, I retrieve the following error (MSVS2008):</p>
  <pre><code>fatal error LNK1241: resource file res_yyy.res already specified
  </code></pre>
  <p>Note, that this happens only in <code>Debug</code> and <code>Release</code> library builds without any troubles. The command line for <code>Resources</code> page in project configuration looks the same for every build:</p>
  <pre><code>/fo&quot;...(Path here)/Debug/project_name.res&quot;
  /fo&quot;...(Path here)/Release/project_name.res&quot;
  </code></pre>
  <p>and I can't understand what's the trouble. <em>Any ideas?</em></p>
  <h1>UPDATE</h1>
  <p>I don't know why this happens, but when I turn &quot;Use Link-Time Code Generation&quot; option on the problem goes away.</p>
  <p><em>Could somebody explain why does this happen?</em> I feel like MS-compiler is doing something really strange here.</p>
  <p>Thanks.</p>