title: Boost Python portability concerns
body: <p>I have a dll written in C++ that I want to export to Python for running regression and unit-testing (it's just easier to maintain and run the regression with Python).
  To this purpose I want to use Boost.Python to export the main API of the dll so it will be usable in Python.
  My assemblies look as follows:</p>
  
  <ol>
  <li>MyLibrary.dll //main API C++ library</li>
  <li>MyLibrary.pyd //a thin dll project containing only the <code>BOOST_PYTHON_MODULE</code> export definitions (dependant on MyLibrary.dll)</li>
  <li>... //other C++ dll files that MyLibrary.dll is dependent on</li>
  </ol>
  
  <p>I had some trouble getting MyLibrary.pyd to link but after digging through questions a bit (e.g. <a href="https://stackoverflow.com/questions/2635933/boost-python-version">here</a>) I realised I had to re-build boost while pointing <code>b2.exe</code> to my specific Python version. After which I was able to import and run my library from python (on <strong>my machine alone</strong>).</p>
  
  <p>Technical data: I'm building the libraries with boost 1.51, Python 3.23 on Windows 7 x64 and MSVC-10.0 (my own projects are built from VS2010). The variant I'm using to link with boost is shared libraries, 64 address model, release accordingly with my own builds.</p>
  
  <p>The problem is, when I try to import the library (built on my machine) on another machine, python complains: </p>
  
  <pre><code>ImportError: DLL load failed: The specified procedure could not be found.
  </code></pre>
  
  <p>On the line <code>import MyLibrary</code> </p>
  
  <p>Which begs the following questions:</p>
  
  <ol>
  <li>Is the MyLibrary.pyd I built on my machine "python-portable"? Meaning, will it work on other versions of Python besides 3.23 (the version I used to build boost.python with on my machine)?</li>
  <li>Does the user of MyLibrary.pyd have to re-build boost with his own version of python in order to be able to successfully import it?</li>
  <li>So far we've been using the pre-built boost installer for windows supplied by BoostPro. What version of Python is that build linked against and can I save my users the headache of building boost on their own if we simply decide to work with the "right" version of Python across the team (the version BoostPro linked against)?</li>
  </ol>