Subject: Re: Windows and libssh2 not working

Re: Windows and libssh2 not working

From: Guenter <lists_at_gknw.net>
Date: Wed, 01 Dec 2010 19:38:50 +0100

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).

BTW. such problems you face is nothing unknown but very common, and even
if the libssh2.dll would have been build with MSVC then just a different
compiler switch is enough to make your program fail. Build self from
source so you can be sure that you compile both the DLL and your program
with same compiler switches; if your program then still fails then you
can at least rule out that is is a compiler issue.

Gün.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-12-01