Re: ctypes dlopen unresolved symbols simple issue
Anderson Lizardo <[email protected]>
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 23, 2010 at 6:21 PM, Patricio Stegmann <[email protected]> wrote: > Hello to all, > > I have a little problem trying to load a .so on linux. > Basically if I do: > > ld my_lib.so > > it tells me undefined reference to XInitThreads > > if I do: > > ld -lX11 my_lib.so > > it works fine ... When I had a similar problem (but with other libraries), I first loaded the depending library(ies) using: libx11 = ctypes.CDLL("libX11.so.6", mode=ctypes.RTLD_GLOBAL) (note the "modes" keyword) followed by my own library: mylib = ctypes.CDLL("mylib.so") Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia (INdT) Manaus - Brazil ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev