user2748911
user2748911

Reputation: 1

Installing PythonMagick with boost on osx

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.

Upvotes: 0

Views: 1080

Answers (1)

DWishR
DWishR

Reputation: 111

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.

Upvotes: 1

Related Questions