Interface to a dynamic lib which loads other dynamic libs
Georg Holzmann <[email protected]> Mon, 18 Oct 2010 16:27:47 +0200
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
Hallo!
I try to use a dynamic library (slv2) in python, which is actually a
host for plugins (lv2 audio plugins, http://lv2plug.in/).
That means slv2 loads other dynamic libraries (= plugins) at runtime and
I want to be able to call functions from those plugins.
The basic interface to slv2 works as it should, but as soon as I want to
instanciate some plugins, I get the following problem with ctypes:
AttributeError: /usr/lib/libslv2.so.9: undefined symbol:
slv2_instance_activate
because the symbol slv2_instance_activate is not in the slv2 library.
I also tried to additionally load the plugin with ctypes:
ctypes.CDLL("/usr/lib/lv2/mypluginname.so", mode=ctypes.RTLD_GLOBAL)
but that also did not work.
So my question:
Is it possible to interface such complicated libraries with ctypes ? (or
should I use something else)
How should this be done ?
Thanks for any hints,
LG
Georg
PS: I am on ubuntu linux, python version 2.6.5
--
http://grh.mur.at
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev