How to call a function from a shared library ?

T

Tom Van Acker

Hello,

I'm getting overwhelmed by information if I google this question. But
it is not clear to me. I have a shared library (.so file), created by
some other company we work with. Now I have to call a certain function
from this shared library. The declaration looks like this;

int TransformPoints(void * vel_g, void* vel_i, void* vpoints, int nb)
;

Untill now, I was using the ctypes module to access this function. The
first two parameters are arrays[0..23] of type double and the third
parameter is an array[0..2] of type double. Using the ctypes module,
this works allright.

But now I have to port this application to other platforms, and I
cannot use the ctypes module anymore (due to libffi incompatibility).
Is there another way to do this?

Any help would be greatly appreciated.

Tom
 
N

Nigel Rowe

Tom said:
Hello,

I'm getting overwhelmed by information if I google this question. But
it is not clear to me. I have a shared library (.so file), created by
some other company we work with. Now I have to call a certain function
from this shared library. The declaration looks like this;

int TransformPoints(void * vel_g, void* vel_i, void* vpoints, int nb)
;

Untill now, I was using the ctypes module to access this function. The
first two parameters are arrays[0..23] of type double and the third
parameter is an array[0..2] of type double. Using the ctypes module,
this works allright.

But now I have to port this application to other platforms, and I
cannot use the ctypes module anymore (due to libffi incompatibility).
Is there another way to do this?

Any help would be greatly appreciated.

Tom

Maybe Pyrex (http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/).
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top