[Numpy-discussion] C Extensions, CTypes and "external code & libraries
Tue Feb 12 10:19:37 CST 2008
Albert Strasheim <email@example.com> wrote: Hello,
I only quickly read through the previous thread, but I get that idea
that what you want to do is to link your shared library against the
the GSL shared library and then access your own library using ctypes.
If done like this, you don't need to worry about wrapping GSL or
pulling GSL code into your own library.
As far as I know, this works exactly like it does when you link an
executable against a shared library.
If distutils doesn't allow you to do this easily, you could try using
SCons's SharedLibrary builder instead.
Yes, I think you got the idea right. I want to call my own C code using CTypes interface, then from within my C code call GSL C code, i.e. a C function calling another C function directly. I do *not* want to go back out through the Python interface. So you are right, I do not want to wrap GSL.
It sounds like I can just add something like -lnameofGSLdylib (where I put in the real name of the GSL library after the -l) in my gcc command to make my shared lib. Is that right?
Thanks for your help.
-- Lou Pecora, my views are my own.
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion