Installing PythonMagick with boost on osx

元气小坏坏 提交于 2019-12-12 04:39:19

问题


I am trying to install PythonMagick following these instructions. https://gist.github.com/tomekwojcik/2778301

When I get to $ make I get this error

Making all in pythonmagick_src
CXX      libpymagick_la-_DrawableFillRule.lo
_DrawableFillRule.cpp:3:10: fatal error: 'boost/python.hpp' file not found
#include <boost/python.hpp>
         ^
1 error generated.
make[1]: *** [libpymagick_la-_DrawableFillRule.lo] Error 1
make: *** [all-recursive] Error 1

How do I get PythonMagick installed in my project? Any way that will work. I can't find useful instructions anywhere on the internet.


回答1:


Make sure you have boost-python brew boost-python. Note the version number, as you'll need to replace 1.59.0 below with the correct version.

$ BOOST_ROOT=/usr/local/Cellar/boost/1.59.0
$ ./configure

Edit Makefile and pythonmagick_src/Makefile to include the boost library. You are looking for two lines: DEFAULT_INCLUDES and LDFLAGS. You'll add boost paths to the end of those lines, making them look something like this:

DEFAULT_INCLUDES = -I. -I$(top_builddir)/config -I/usr/local/Cellar/boost/1.59.0/include
LDFLAGS = -L/usr/local/Cellar/boost-python/1.59.0/lib

That should resolve the compile/link errors.



来源:https://stackoverflow.com/questions/28162495/installing-pythonmagick-with-boost-on-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!