Boost logo

Boost-Build :

Subject: [Boost-build] Can't build boost-python with MinGW
From: Jan Drabner (jan_at_[hidden])
Date: 2014-02-24 05:22:50


I've been trying to build boost-python for some time now and I am having
a very hard time (everything else in boost builds and works just fine).
I am using boost 1.53 (can't switch to the latest), Python 2.7 and MinGW
4.8.1 (the latest).

Of course, I am following the build guide for boost python (but I also
tried building it normally, from root directory, using
"--enable-python"). So far, I got it to build the static versions of the
library, but I begin to think that they are broken, as linking against
them in any project always yields undefined references.

When I tried linking against the shared library versions of
boost-python, I noticed they are not there, and rebuilding with
--enable-shared showed that it tries to build the shared versions, but
gets loads of undefined references, like:

In function `property_init':
undefined reference to `_imp__PyArg_ParseTupleAndKeywords'
undefined reference to `_imp___Py_NoneStruct'
undefined reference to `_imp___Py_NoneStruct'
undefined reference to `_imp___Py_NoneStruct'

There are too many to post them all, but it looks like it cannot find a
single define (PyInt_AsLong, PyType_Type, etc.).

What could be the problem here? At no point, claimed to not
be able to find Python. And I've read that the Python libraries are
compatible with MinGW, even if they were built with MSVC. So I did not
build Python myself with MinGW.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at