ctype question

A

Amit Gupta

Hi,

I have been using ctype.cdll to load a library, but I am unable to
figure out how to load multiple libraries that depends on each other.
E.g. I have two libraries A.so and B.so. A.so has some undefined
references, and those symbols are defined in B.so.

When I try to load ctypes.cdll.LoadLibrary("A.so"), it gives errors
about the undefined Symbols. Even if I load B.so before loading A.so,
the error remains the same (which is expected). Can someone help me to
find out, how to load A.so by telling it to look for undefined symbols
in B.so as well?

Thanks, Amit
 
T

Thomas Heller

Amit said:
Hi,

I have been using ctype.cdll to load a library, but I am unable to
figure out how to load multiple libraries that depends on each other.
E.g. I have two libraries A.so and B.so. A.so has some undefined
references, and those symbols are defined in B.so.

When I try to load ctypes.cdll.LoadLibrary("A.so"), it gives errors
about the undefined Symbols. Even if I load B.so before loading A.so,
the error remains the same (which is expected). Can someone help me to
find out, how to load A.so by telling it to look for undefined symbols
in B.so as well?

You could try to pass ctypes.RTLD_GLOBAL as the 'mode' parameter to
ctypes.CDLL when you load the library.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top