TNG / boost-python-examples

Some examples for the use of boost::python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could you add a little bit of detail in the section about compiling python3 for OS X?

joshuroar opened this issue · comments

I'm trying to compile on OS X and tried to follow the instructions but I'm running into problems.

  1. I built boost-python (v 1.60.0) from homebrew with python3 support. So /usr/local/Cellar/boost-python/1.60.0/lib/ contains static and dynamic libraries for python 2 and 3, with and without multithreading. Eight total.

  2. Python is resolving to python3 using a virtualenv when I run the bash script.

  3. I run cmake with the added parameters you've specified, as follows:
    -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib
    -DBOOST_ROOT=/usr/local/Cellar/boost/1.60.0_2/
    -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/Headers/

  4. Lastly, in the bash script, I've added the line before running cmake: DYLD_LIBRARY_PATH=/usr/local/Cellar/boost-python/1.60.0/lib/


I believe this is the directory where the boost::python shared library resides, so it should be as instructed. If we can figure this out, I'd like to submit a patch to get it fixed or fork.

Solved and pull requested