[C++-sig] Embedding Python into a Shared Object

Ingo Lütkebohle iluetkeb at gmail.com
Thu Aug 24 21:46:02 CEST 2006


Hi bEngO,

the flags you mention only work when used on the binary thats
ultimately loading the shared libraries (i.e., your plugin).

One kludge is to explicitly load libpython.so yourself before using
any modules.  When doing so, you can pass the correct options
(RTLD_GLOBAL, at least on Linux) to dlopen, so that the symbols are
globally available.

If anyone found a better solution, I'd be interested, too!

Cheers, Ingo

-- 
Dipl.-Inform. Ingo Lütkebohle
Faculty of Technology
Bielefeld University
http://www.techfak.uni-bielefeld.de/~iluetkeb/

Fingerprint 3187 4DEC 47E6 1B1E 6F4F  57D4 CD90 C164 34AD CE5B



More information about the Cplusplus-sig mailing list