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

Lou Pecora lou_boog2000@yahoo....
Thu Feb 14 07:57:08 CST 2008

--- David Cournapeau <cournapeau@cslab.kecl.ntt.co.jp>

> 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 true, that's a good argument. I don't know the
> state of libtool of
> mac os X (the part of autotools which deals with
> building libraries in a
> cross platform way). Given the history of apple with
> open source, I
> would not be surprised if the general support was
> subpar compared to
> other unices.

I ran the GSL install again and allowed the dynamic
lib to be built.  It worked fine so maybe Apple has
done better lately.  I should have tried it right from
the beginning.  Anyway,  I have a make script that
seems to work find and I can link my shared lib to the
GSL library or, I would guess, any other library I
have.  Thanks, again for your helpful suggestions.

I will put up my code (it's small) for others to see
on this list in a separate message.  That might help
others not to make the same mistakes I did.

> I don't know what kind of applications you are
> developing, but taking
> care of the time to load the application because of
> the huge number of
> symbols seems like really premature optimization to
> me. That's the kind
> of problems you don't see if your applications are
> not huge (or
> developed with C++, which put a huge pressure on the
> linker/loader tools
> by its very nature).
> Also, note that all modern OS (this includes even
> windows since NT) do
> not load the whole shared library in memory, and
> that two applications
> needing the GSL will share the same version in
> memory. The same
> "physical page" of a shared library can be "mapped"
> into different
> address spaces (for different processes). I use "",
> because that's a
> huge over-simplification, and that's where it
> reaches my own
> understanding of the thing. This sharing cannot
> happen for static
> libraries.

Good advice. You are right.  My code is not large and
it loads fast.  

-- Lou Pecora,   my views are my own.

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

More information about the Numpy-discussion mailing list