Recently, I am learning boost C++ library. I want to use python to call exist C++ project. I have install boost under OSX 10.11 using brew install boost
. My pyt
It is advisable to change the Boost dynamic libraries themselves on MacOS instead of changing the executables or other dynamic libraries linked against them. Run the bash
script given below in the directory that contains your libboost_XXX.dylib
libraries:
#!/bin/bash
# Modify the absolute dylib paths baked into the libraries
for i in *.dylib
do
FULLPATH=`pwd`/$i
install_name_tool -id $FULLPATH $i
echo -change $i $FULLPATH
done > changes
for i in *.dylib
do
install_name_tool `cat changes` $i
done
rm changes
You will need to do this only once after you built the Boost libraries. No mucking around with the executables linking against them is needed.