title: C++ Project compiles as static lib, fails (linker error) as dynamic lib. why?
body: <p>I've a VS2008 native C++ project, that I wish to compile as a DLL.</p>
  
  <p>It only references one external library (log4cplus.lib), and uses its functions.
  (also uses log4cplus's .h files , naturally).</p>
  
  <p>When I try to compile my project as a static library, it succeeeds.
  When I try as DLL, it fails :</p>
  
  <pre><code>1&gt;MessageWriter.obj : error LNK2019: unresolved external symbol "public: static class log4cplus::Logger __cdecl log4cplus::Logger::getInstance(class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp;)" (?getInstance@Logger@log4cplus@@SA?AV12@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) referenced in function "class log4cplus::Logger __cdecl Log(void)" (?Log@@YA?AVLogger@log4cplus@@XZ)
  </code></pre>
  
  <p>There are 4 more errors just like this related to functions within log4cplus.lib.</p>
  
  <p>It seems like something really stupid.. please help me :)</p>
  
  <p>Thanks!</p>
  
  <p>Edit : </p>
  
  <p>I am linked against the log4cplus.lib file, and it finds it just fine.
  also, the log4cplus.lib is 100% functional, I am using it in another project with no problems.
  My original intention was to compile my project as a static library and use it in another DLL I am writing, but when do this, I get the same linker errors in that other project...</p>
  
  <p>Edit #2 : </p>
  
  <p>The functions which cause the linker errors are static functions.. could this be part of the problem?</p>