Subject: [boost] [python] Help with boost python build
From: Andy Thomason (a.thomason_at_[hidden])
Date: 2015-08-10 07:36:49
I have had highly variable results with Boost.Python mostly due to
or failures of Python to find DLLs.
Python is not great at reporting why it fails, for example not naming
to load dependent DLLs on Windows which does not make this a joyous
I have never managed to get any Boost.Python example - mine or otherwise
on Windows and have had limited success on Linux. It is little surprise
that all the
examples on Stackoverflow avoid Bjam for builds.
For my genetics library, I have an example that has a single source file
and the Jamfile
python-extension genetics : bindings.cpp :
using python : 2.7 ;
ie. as minimal as possible.
This builds well on linux (I am adding a library to the head of modular
When I run:
python -c "import genetics"
with appropriate PYTHONPATH
I get a run-time symbol search error:
ImportError: <...>/genetics.so: undefined symbol:
My guess would be that rather than this one symbol, Python is failing to
load the shared lib:
As a postscript, It would be lovely if there were no static or dynamic
libraries to link with
when compiling with Boost.Python and a unity build would be a nice
option as this would bypass
linker and runtime related errors. It would probably compile faster in
my long experience
with such projects.
Any help would be welcome.
--- This email has been checked for viruses by Avast antivirus software. http://www.avast.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk