Extension on Windows
eric.frederich at gmail.com
Fri Nov 19 16:15:53 CET 2010
On Fri, Nov 19, 2010 at 8:12 AM, Ulrich Eckhardt
<ulrich.eckhardt at dominolaser.com> wrote:
> Eric Frederich wrote:
>> Do I put them [DLL dependencies] in some environment variable?
>> Do I put them in site-packages along with the .pyd file, or in some
>> other directory?
> Take a look at the LoadLibrary() docs:
> These further lead on to:
> which details in what order different places are searched for DLLs.
> If you put the DLL in the same directory as your PYD, it should work. This
> is not the most elegant solution though, see above for more info.
Well... I used the tool and found missing dependencies and just copied
them into site-packages.
There were two. Then when I put those two in there and ran
dependencywalker again, I had 6 more missing.
I found all of these dependencies in a "bin" directory of the program
which I'm trying to create bindings for.
The one I couldn't find was MSVCR80.DLL but my python module imported
fine so maybe its not a big deal (actually, if I throw one of their
dll files into dependency walker it shows the same thing).
This was just with me wrapping one (very basic) routine. I would
imagine as I wrap more and more, I'd need more and more dll files.
I think rather than copying .dll files around, I'll just put my .pyd
file in their 'bin' directory and set PYTHONPATH environment variable.
Things are starting to look promising.
I now have to deal with other issues (coming up in a new python-list thread).
Thanks a bunch Ulri.
More information about the Python-list