Subject: RE: Windows and libssh2 not working

RE: Windows and libssh2 not working

From: Mark Riordan <>
Date: Wed, 1 Dec 2010 09:14:20 -0600

> I am new to Visual Studio C++ development.
> But from what I read dynamic linking means calls to the dll
> is resolved at run time and
> implicit/static linking is resolved at compile time.
> Does this mean if I use implicit linking and
> the location of the dll changes then I need to recompile my client

No - Windows will search your path to find the DLL.

> 3. I wrote a very simple client program based on MSDN socket program:
> sock=ssh_connection(host)); /* Creates socket to host */
> session = libssh2_session_init();
> if (status=libssh2_session_startup(session, sock)) exit(0);
> userauthlist = libssh2_userauth_list(session, username,
> However userauthlist is empty.

I'm not sure what is wrong, but it might be easier to diagnose if
you put a call like this in your program, after libssh2_session_init:

  libssh2_trace(session, ~0);

then report what is printed on stderr.
You may want to redirect it like this:

mytest.exe 2>trace.txt


Received on 2010-12-01