[Numpy-discussion] numpy.distutils, windows dll vs lib

Albert Strasheim fullung@gmail....
Fri Mar 16 00:53:02 CDT 2007


Hello all

----- Original Message ----- 
From: "David Cournapeau" <david@ar.media.kyoto-u.ac.jp>
To: "Discussion of Numerical Python" <numpy-discussion@scipy.org>
Sent: Friday, March 16, 2007 6:51 AM
Subject: Re: [Numpy-discussion] numpy.distutils, windows dll vs lib


> Robert Kern wrote:
>> David Cournapeau wrote:

<snip>

>> Generally, you don't use .dll files to link against. With MSVC, you need 
>> a .lib
>> file corresponding to your target .dll file which has the symbols. mingw 
>> and
>> cygwin use similar .a files. This information is coded in the
>> system_info.library_extensions() method, which you can override if you 
>> need
>> something different. Of course, since you don't mention what methods on
>> system_info that you are using, I can't quite be sure this will satisfy 
>> your needs.
> Sorry for the lack of details; I did this a long time ago, and the
> problem popped up for some people my package with windows (which I don't
> at all) just recently.
>
> I don't use the library for linking: I only need to be able to load it
> dynamically through ctypes. What I did is simply overriding the
> calc_info method, in which I try to detect both library and header
> files. For the library, I do the following:

You might try numpy.ctypeslib.load_library.

Cheers,

Albert 



More information about the Numpy-discussion mailing list