title: VS LINK cannot open file 'boost_python...' instead of libboost_python3-vc140-mt-gd-1_65
body: <p>This morning I installed Python 3.6, got my b2 config to compile the boost lib and do have both flavors of <code>libboost_python3...</code> in the lib path. Then with a simple:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;boost/python.hpp&gt;
  
  char const* greet()
  {
      return "hello, world";
  }
  
  BOOST_PYTHON_MODULE(hello_ext)
  {
      using namespace boost::python;
      def("greet", greet);
  }
  </code></pre>
  
  <p>I get a linker error:</p>
  
  <pre><code>LINK : fatal error LNK1104: cannot open file 'boost_python-vc140-mt-gd-1_63.lib'
  </code></pre>
  
  <p>I've searched for the likes of a flag like <code>USING_BOOST_PYTHON3</code> but every thing I read says that it should be automatic. That Boost should include the proper lib according to what I've built.</p>
  
  <p><a href="https://stackoverflow.com/questions/44153858/linking-against-boost-python-3-6-cant-find-boost-python-instead-of-boost-pytho">This guy</a> Had the same problem but never got an answer. That was as close as I could get to the links in 'Similar Questions' on the right. But I can't see how VS is part of this as boost will pick the libs.</p>
  
  <p><strong>Update:</strong> I just found:</p>
  
  <pre><code>#if PY_MAJOR_VERSION == 2
  #  define BOOST_LIB_NAME boost_python
  #elif PY_MAJOR_VERSION == 3
  #  define BOOST_LIB_NAME boost_python3
  #endif
  </code></pre>
  
  <p>So now it looks like why is my major version 2 instead of 3? And even if I:</p>
  
  <pre><code>#define PY_MAJOR_VERSION 3
  </code></pre>
  
  <p>Right at the top of my <code>stdafx.h</code> it still links with the python 2 lib. !?</p>
  
  <p><strong>Yet Another Update</strong>:
  So early on, and I don't have python 2.7 'installed', I had set the Additional Libraries to <code>C:\cpp\Python27\libs</code> I just set it to <code>C:\cpp\Python36_3\libs</code> and now I get:</p>
  
  <pre><code>LINK : fatal error LNK1104: cannot open file 'python27.lib'
  </code></pre>
  
  <p>Makes sense as boost is trying to link to 2.x instead of 3.x</p>