Subject: Re: static linking problem

Re: static linking problem

From: Dan Fandrich <>
Date: Mon, 18 Oct 2010 11:45:33 -0700

On Mon, Oct 18, 2010 at 07:19:48PM +0100, may nothing wrote:
> Tried, but no effect. I also tried adding -lssh2 ...
> Given the fact that the linker complains about "libssh2_init" it looks more like
> a ssh.h problem to me. But still, libssh2.h and libssh2_sftp.h are available in
> /usr/local/include

Do you even have a static library available? Try adding the path to that library
on your link command, e.g. gcc -o foo foo.o /usr/local/lib/libssh2.a
And don't forget to add any libraries given by "pkg-config libssh2 --static".

>>> Dan
Received on 2010-10-18