在OSX上安装带有Boost的PythonMagick [英] Installing PythonMagick with boost on osx

查看:103
本文介绍了在OSX上安装带有Boost的PythonMagick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照以下说明安装PythonMagick. https://gist.github.com/tomekwojcik/2778301

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

到达$ make时出现此错误

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

如何在项目中安装PythonMagick?任何可行的方式.我在互联网上的任何地方都找不到有用的说明.

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

推荐答案

确保您具有boost-python brew boost-python.注意版本号,因为您需要将下面的1.59.0替换为正确的版本.

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

编辑Makefilepythonmagick_src/Makefile以包括增强库.您正在寻找两行:DEFAULT_INCLUDESLDFLAGS.您将在这些行的末尾添加增强路径,使它们看起来像这样:

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.

这篇关于在OSX上安装带有Boost的PythonMagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆