title: Boost lib linker error Visual C++
body: <p>I downloaded the source for <a href="http://www.launchy.net/" rel="noreferrer">Launchy</a> and am trying to build it in Visual Studio 2005.  The Launchy project is built using VC7 so I had to update the project files to VC8 and that process seemed to go well.  However, Launchy also uses the <a href="http://www.boost.org/" rel="noreferrer">Boost</a> 1.33.1 libs and what I have built are the Boost 1.41.0 libs (props to Boost for making the more recent libs much easier to build), so I also updated the project to point to my new Boost libs install.  Now I get the following linker error:</p>
  
  <pre><code>fatal error LNK1104: cannot open file 'libboost_regex-vc80-mt-sgd-1_41.lib'
  </code></pre>
  
  <p>I had a look in the Boost lib directory and the closest match that I could find is...</p>
  
  <pre><code>libboost_regex-vc80-mt-gd-1_41.lib
  </code></pre>
  
  <p>Notice the missing 's'.  I don't understand what the difference in libs is, and whether Visual Studio is looking for the wrong thing or my Boost build process failed to build the right libs.  Can anybody point me in the right direction?</p>
  
  <p>As an experiment, I made a copy of the regex lib that I have and renamed it to what the linker is looking for.  That gives me a long list of linker errors about symbols already being defined in msvcrtd.lib, such as the following:</p>
  
  <pre><code>error LNK2005: "private: __thiscall type_info::type_info(class type_info const &amp;)" (??0type_info@@AAE@ABV0@@Z) already defined in libcmtd.lib(typinfo.obj)
  </code></pre>
  
  <p>I will try to build the Boost 1.33.1 libs and point my Launchy project file at that instead.  But I'd still like to know what is wrong with my Boost 1.41.0 libs.</p>
  
  <p><strong>Edit</strong>: I found a reference <a href="http://www.boost.org/doc/libs/1_41_0/more/getting_started/windows.html" rel="noreferrer">in the Boost docs</a> to what the 's' libs are:</p>
  
  <blockquote>
    <p>Use this library when linking statically to the C++ standard library and compiler runtime support libraries.</p>
  </blockquote>
  
  <p>So it looks like the 's' libs are the right ones.  Now I just have to figure out how to build them.</p>
  
  <p><strong>Solution</strong>: I was able to build the missing boost libs with the following command-line.</p>
  
  <pre><code>bjam --build-type=complete msvc stage
  </code></pre>
  
  <p>I ran that after already running boostrap.bat in the dir where boost lives.</p>