April 25, 2005
8:54 a.m.
On Wed, 2005-04-20 at 17:50 -0700, J. Michael Owen wrote:
import sys, dl sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
While this seems to have solved all of my current cross-library problems, I'm suspicious that it could be this simple. Does anyone else here have any experience with these g++/Boost.Python/cross module issues? Is there a reason the above might be a bad idea?
This is what I do. The only possible problem, I think, is that the symbols might conflict with other C modules you will load later. Using namespaces should make this unlikely, and I typically reset dlopenflags back to normal (i.e. no RTLD_GLOBAL) once I've imported my boost module. And of course this won't work on Windows :)