From: Thomas Jollans on
On 07/05/2010 04:35 PM, Bill Davy wrote:
> I am struggling :-(

smile!

>
> I have used SWIG to build a module called SHIP. So I have a directory
> containing SHIP.py and _SHIP.pyd, as follows:
>
> [ ...]
>
> Python appears to find H:\Viper\HostPC\V1\SHIP\Release\_SHIP.pyd but for
> some reason, which I cannot fathom, says "DLL load failed".
>

Maybe it doesn't mean _SHIP.pyd, but another DLL: maybe _SHIP.pyd
depends on some other DLL? Since you used SWIG, I'm guessing that you're
wrapping some other library. Maybe that's what it can't find.

>
>
> Can anyone offer me any suggestion where I am going wrong or how to tackle
> this problem?
>
>
>
> Could it be that the Python 2.6 I am running did not use the same compiler
> (VC6) with which I buiult _SHIP.pyd and if so, is there a way round this
> without moving on from VC6?
>

Shouldn't be a problem, as long as the calling convention hasn't change,
which it hasn't. If you're on a 64-bit system there might be a problem
there with Python and some DLLs being built for different architectures?

Cheers,
Thomas
From: Bill Davy on
"Thomas Jollans" <thomas(a)jollans.com> wrote in message
news:mailman.265.1278342154.1673.python-list(a)python.org...
> On 07/05/2010 04:35 PM, Bill Davy wrote:
>> I am struggling :-(
>
> smile!
>
>>
>> I have used SWIG to build a module called SHIP. So I have a directory
>> containing SHIP.py and _SHIP.pyd, as follows:
>>
>> [ ...]
>>
>> Python appears to find H:\Viper\HostPC\V1\SHIP\Release\_SHIP.pyd but for
>> some reason, which I cannot fathom, says "DLL load failed".
>>
>
> Maybe it doesn't mean _SHIP.pyd, but another DLL: maybe _SHIP.pyd
> depends on some other DLL? Since you used SWIG, I'm guessing that you're
> wrapping some other library. Maybe that's what it can't find.
>

Well, there's no mention of another librarary, and "import _SHIP" is the
first (non-comment) statement in SHIP.py
But when I run Dependency Walker against _SHIP.pyd it does say there's a
missing DLL (WINUSB.DLL) so I suspect I've got to sort that out.

>>
>>
>> Can anyone offer me any suggestion where I am going wrong or how to
>> tackle
>> this problem?
>>
>>
>>
>> Could it be that the Python 2.6 I am running did not use the same
>> compiler
>> (VC6) with which I buiult _SHIP.pyd and if so, is there a way round this
>> without moving on from VC6?
>>
>
> Shouldn't be a problem, as long as the calling convention hasn't change,
> which it hasn't. If you're on a 64-bit system there might be a problem
> there with Python and some DLLs being built for different architectures?

Yep, all for the same architetcure. I suspect it's a dependency problem.
Oh well.

>
> Cheers,
> Thomas