【问题标题】:Installing PythonMagick with boost on osx在 osx 上使用 boost 安装 PythonMagick
【发布时间】:2015-03-25 14:18:52
【问题描述】:

我正在尝试按照这些说明安装 PythonMagick。 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?任何可行的方法。我在互联网上的任何地方都找不到有用的说明。

【问题讨论】:

    标签: macos boost boost-python pythonmagick


    【解决方案1】:

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

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

    编辑 Makefilepythonmagick_src/Makefile 以包含 boost 库。您正在寻找两条线:DEFAULT_INCLUDESLDFLAGS。您将在这些行的末尾添加提升路径,使它们看起来像这样:

    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
    

    这应该可以解决编译/链接错误。

    【讨论】:

      猜你喜欢
      • 2012-05-05
      • 2020-05-02
      • 2012-10-27
      • 2012-06-12
      • 2017-05-12
      • 2017-01-12
      • 2018-08-26
      • 2015-07-31
      • 1970-01-01
      相关资源
      最近更新 更多