How to call a function from a shared library ?

Nigel Rowe rho at see.signature.invalid
Tue May 11 03:32:04 EDT 2004


Tom Van Acker wrote:

> 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/).
-- 
        Nigel Rowe
        A pox upon the spammers that make me write my address like..
                rho (snail) swiftdsl (stop) com (stop) au



More information about the Python-list mailing list