Re: ctypes dlopen unresolved symbols simple issue

[email protected]
Newsgroups gmane.comp.python.ctypes
Message-ID <835084004-1269388030-cardhu_decombobulator_blackberry.rim.net-1649723023-@bda2154.bisx.produk.on.blackberry>
Thank you for your answer Lizardo !
The problem is that I am trying to create a wrapper with xml2py and the codegen isn't doing this ! Do you have any idea on how to pass the correct lib to it ? Do I needto edit something on it ?
------Original Message------
From: Anderson Lizardo
To: Patricio Stegmann
Cc: ctypes users mailing list
Subject: Re: [ctypes-users] ctypes dlopen unresolved symbols simple issue
Sent: Mar 23, 2010 20:34

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



Enviado do meu BlackBerry® da TIM
------------------------------------------------------------------------------
Download Intel&#174; 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.