Subject: Re: Windows and libssh2 not working

Re: Windows and libssh2 not working

From: Simon Josefsson <>
Date: Wed, 01 Dec 2010 21:46:39 +0100

Guenter <> writes:

> Hi Phillip,
> Am 01.12.2010 02:27, schrieb Phillip Wu:
>> I tried implicit linking:
>> 1. I downloaded the libssh2.dll (version 1.2.7), libgcrypt.dll, libgpg-error.dll
>> 2. I created *.obj for libssh2 using MSDN document "How To Create 32-bit Import Libraries Without .OBJs or Source"
>> This is a dummy *.obj file used to tell the linker about the calls in the dll.
> although this might sometimes work with some luck this is not a
> recomment way to - especially not since the DLL you pointed to is
> build with another compiler (MinGW32). Why dont you build the libssh2
> lib/dll self from source? Within the time you spent with fiddling with
> the import lib I bet you would have build libssh2 including
> dependencies twice ...
> On the other side if you really want to use this downloaded
> libssh2.dll then its really recommended to use the MingW32 compiler
> (free).

I would also recommend MinGW32, but I don't think luck is required to
use an import library successfully -- I use similar schemes for a bunch
of project, to support Windows applications written in MSVS. There have
been problems, but none that couldn't be fixed, and none was directly
caused by the compiler mix (modulo some compiler bugs which have
subsequently been fixed..).

For some other projects, I create a DEF file using -Wl,--output-def,
which makes MSVS integration simpler, we could consider something

Received on 2010-12-01