[issue19153] Embedding into a shared library fails again

Rinat report at bugs.python.org
Fri Oct 4 21:13:51 CEST 2013


Rinat added the comment:

> Or perhaps you can dlopen the CPython shared library with the RTLD_GLOBAL flag. I don't know.

Yes, it works. I made it is my shared library before boost block like this

{
  void* handle = dlopen("libpython2.7.so", RTLD_LAZY | RTLD_GLOBAL);
  // boost wrapper for python call
  dlclose(handle);
}


I think if nothing helps, i'll put this code into __attribute__((ctor|dtor)) functions

Thanks a lot

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19153>
_______________________________________


More information about the Python-bugs-list mailing list