[C++-sig] Re: Embedded Python plus module loading

Daniel Holth dholth at fastmail.fm
Mon Mar 21 18:35:33 CET 2005


My problem means boost.build doesn't know how to properly link my
embedded Python program. I can add that same line "import sha" to
/libs/python/test/embedding.cpp, build it with 'bjam embedding', and the
test fails to run properly.

According to the ld manual page I need to use --export-dynamic to expose
symbols coming from static parts of my binary (like the static libpython
boost.build likes to link to) to dynamic libraries like imported python
modules. Or I can just dynamically link libpython

I haven't sufficiently decoded boost.build to figure out how to change
the library search path to prefer the dynamically loaded Python library
xor add the linker option --export-dynamic, I would prefer to just
dynamically link libpython and it would be nice to keep boost's handy
Python version finder.

Thanks for any help,

Daniel Holth



More information about the Cplusplus-sig mailing list