Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-14 Thread Lou Pecora
--- David Cournapeau [EMAIL PROTECTED] wrote: On Wed, 2008-02-13 at 08:20 -0800, Lou Pecora wrote: Yes, a good question. Two reasons I started off with the static library. One is that Gnu instructions claimed the dynamic library did not always build properly on the Mac OS X. If

Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-13 Thread David Cournapeau
On Feb 14, 2008 12:14 AM, Lou Pecora [EMAIL PROTECTED] wrote: --- David Cournapeau [EMAIL PROTECTED] wrote: Oh, I may have misunderstood what you are trying to do then. You just want to call a shared library from another shared library ? This is possible on any platform supporting

Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-13 Thread Lou Pecora
--- David Cournapeau [EMAIL PROTECTED] wrote: But the real question is : if you are concerned with code bload, why using static lib at all ? Why not using shared library, which is exactly designed to solve what you are trying to do ? cheers, David Yes, a good question. Two reasons I

Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-13 Thread Lou Pecora
--- David Cournapeau [EMAIL PROTECTED] wrote: Oh, I may have misunderstood what you are trying to do then. You just want to call a shared library from another shared library ? This is possible on any platform supporting shared library (including but not limited to mac os x, windows,

Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-12 Thread Lou Pecora
--- Jon Wright [EMAIL PROTECTED] wrote: Lou Pecora wrote: ... This appears to be the way static and shared libraries work, especially on Mac OS X, maybe elsewhere. Have you tried linking against a GSL static library? I don't have a mac, but most linkers only pull in the routines

Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-12 Thread David Cournapeau
Lou Pecora wrote: --- Jon Wright [EMAIL PROTECTED] wrote: Lou Pecora wrote: ... This appears to be the way static and shared libraries work, especially on Mac OS X, maybe elsewhere. Have you tried linking against a GSL static library? I don't have a mac, but most linkers only pull in

Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-12 Thread Jon Wright
Lou Pecora wrote: ... This appears to be the way static and shared libraries work, especially on Mac OS X, maybe elsewhere. Have you tried linking against a GSL static library? I don't have a mac, but most linkers only pull in the routines you need. For example, using windows and mingw:

Re: [Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-12 Thread Lou Pecora
Albert Strasheim [EMAIL PROTECTED] 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

[Numpy-discussion] C Extensions, CTypes and external code libraries

2008-02-12 Thread Lou Pecora
First, thanks to all who answered my questions about trying to use a large library with CTypes and my own shared library. The bottom line seems to be this: There is no way to incorporate code external to your own shared library. You have to either pull out the code you want from the static