title: Boost.Python Quickstart Linker Errors
body: <p>I'm just trying to follow the instructions <a href="http://www.boost.org/doc/libs/1_57_0/libs/python/doc/building.html" rel="nofollow">here</a> to get the Quickstart example working. I am on Windows 7 and trying to use MSVC. I have Python 2.7 installed.</p>
  
  <p>What I have done:</p>
  
  <ul>
  <li>Download boost_1_57_0.zip and extract to <code>C:\boost_1_57_0</code>.</li>
  <li><p>From command prompt in <code>C:\boost_1_57_0</code>, run:</p>
  
  <pre><code>bootstrap
  </code></pre>
  
  <p>then:</p>
  
  <pre><code>.\b2
  </code></pre>
  
  <p>as per the instructions under 5.1 <a href="http://www.boost.org/doc/libs/1_57_0/more/getting_started/windows.html" rel="nofollow">here</a>. After this I have a message saying "The Boost C++ Libraries were successfully built!".</p></li>
  <li>Add <code>C:\boost_1_57_0</code> to my path. The instructions don't say to do this, but since they want me to invoke bjam, and that's where it lives, I assume I need to do this.</li>
  <li>Modify <code>C:\boost_1_57_0\libs\python\example\quickstart\boost-build.jam</code> so that the path is <code>boost-build ../../../../tools/build/src ;</code> and not <code>boost-build ../../../../tools/build/v2 ;</code>. This is as per the instructions <a href="http://lists.boost.org/boost-build/2014/11/27738.php" rel="nofollow">here</a> since the original path is wrong and if you don't do this the bjam invocation fails.</li>
  <li><p>CD into <code>C:\boost_1_57_0\libs\python\example\quickstart</code> and run:</p>
  
  <pre><code>bjam toolset=msvc --verbose-test test
  </code></pre></li>
  </ul>
  
  <p>The output I get is firstly:</p>
  
  <pre><code>...patience...
  ...patience...
  ...found 1926 targets...
  ...updating 55 targets...
  common.mkdir bin
  common.mkdir bin\test_ext.test
  common.mkdir bin\test_ext.test\msvc-12.0
  common.mkdir bin\test_ext.test\msvc-12.0\debug
  common.mkdir bin\test_ext.test\msvc-12.0\debug\threading-multi
  common.mkdir bin\msvc-12.0
  common.mkdir bin\msvc-12.0\debug
  common.mkdir bin\msvc-12.0\debug\threading-multi
  compile-c-c++ bin\msvc-12.0\debug\threading-multi\extending.obj
  extending.cpp
  c:\python27\include\pymath.h(22) : warning C4273: 'round' : inconsistent dll linkage
      C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(516) : see previous definition of 'round'
  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(190) : warning C4273: '_hypot' : inconsistent dll linkage
  </code></pre>
  
  <p>followed by a long list of other header file entries, each complaining about inconsistent dll linkage, and then at the end a bunch of errors, highlights of which include:</p>
  
  <pre><code>LINK : fatal error LNK1207: incompatible PDB format in 'C:\boost_1_57_0\libs\python\example\quickstart\bin\msvc-12.0\debug\threading-multi\extending.pdb'; delete and rebuild
  
  ...failed msvc.link.dll bin\msvc-12.0\debug\threading-multi\extending.pyd bin\msvc-12.0\debug\threading-multi\extending.pdb...
  ...removing bin\msvc-12.0\debug\threading-multi\extending.pdb
  
  LINK : warning LNK4001: no object files specified; libraries used
  LINK : error LNK2001: unresolved external symbol _mainCRTStartup
  bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.exe : fatal error LNK1120: 1 unresolved externals
  
  ...failed msvc.link bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.exe bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.pdb...
  ...removing bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.pdb
  ...skipped &lt;pbin\test_embed.test\msvc-12.0\debug\threading-multi&gt;test_embed.run for lack of &lt;pbin\test_embed.test\msvc-12.0\debug\threading-multi&gt;test_embed.exe...
  ...failed updating 4 targets...
  </code></pre>
  
  <p>Any ideas?</p>